diff --git a/src/Controller/EventController.php b/src/Controller/EventController.php index 495c212..003e051 100644 --- a/src/Controller/EventController.php +++ b/src/Controller/EventController.php @@ -10,6 +10,7 @@ use App\Service\RedisCacheService; use Exception; use nostriphant\NIP19\Bech32; use nostriphant\NIP19\Data; +use nostriphant\NIP19\Data\Note; use Psr\Log\LoggerInterface; use swentel\nostr\Key\Key; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; @@ -41,8 +42,7 @@ class EventController extends AbstractController switch ($decoded->type) { case 'note': // Handle note (regular event) - $relays = $data->relays ?? []; - $event = $nostrClient->getEventById($data->identifier, $relays); + $event = $nostrClient->getEventById($data->data); break; case 'nprofile': diff --git a/src/Enum/KindsEnum.php b/src/Enum/KindsEnum.php index 81fe4b4..75cceda 100644 --- a/src/Enum/KindsEnum.php +++ b/src/Enum/KindsEnum.php @@ -6,6 +6,7 @@ enum KindsEnum: int { case METADATA = 0; // metadata, NIP-01 case TEXT_NOTE = 1; // text note, NIP-01, will not implement + case IMAGE = 20; // NIP-68, images case FOLLOWS = 3; case REPOST = 6; // Only wraps kind 1, NIP-18, will not implement case GENERIC_REPOST = 16; // Generic repost, original kind signalled in a "k" tag, NIP-18