Browse Source

Refactor comments, typed

imwald
Nuša Pukšič 3 months ago
parent
commit
6c3bbf7d5d
  1. 4
      src/Twig/Components/Organisms/Comments.php

4
src/Twig/Components/Organisms/Comments.php

@ -63,8 +63,8 @@ final class Comments @@ -63,8 +63,8 @@ final class Comments
$data = json_decode($payload);
// If your handler doesn’t compute zaps/links yet, reuse your helpers here:
$this->list = $data->comments;
$this->authorsMetadata = $data->profiles ?? [];
$this->list = (array)$data->comments;
$this->authorsMetadata = (array)$data->profiles ?? [];
$this->parseZaps(); // your existing method – fills $zapAmounts & $zappers
$this->parseNostrLinks(); // your existing method – fills $commentLinks & $processedContent

Loading…
Cancel
Save