Browse Source

Minor fixes

imwald
Nuša Pukšič 4 months ago
parent
commit
58732e8ee8
  1. 4
      src/Controller/EventController.php
  2. 1
      src/Enum/KindsEnum.php

4
src/Controller/EventController.php

@ -10,6 +10,7 @@ use App\Service\RedisCacheService;
use Exception; use Exception;
use nostriphant\NIP19\Bech32; use nostriphant\NIP19\Bech32;
use nostriphant\NIP19\Data; use nostriphant\NIP19\Data;
use nostriphant\NIP19\Data\Note;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use swentel\nostr\Key\Key; use swentel\nostr\Key\Key;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@ -41,8 +42,7 @@ class EventController extends AbstractController
switch ($decoded->type) { switch ($decoded->type) {
case 'note': case 'note':
// Handle note (regular event) // Handle note (regular event)
$relays = $data->relays ?? []; $event = $nostrClient->getEventById($data->data);
$event = $nostrClient->getEventById($data->identifier, $relays);
break; break;
case 'nprofile': case 'nprofile':

1
src/Enum/KindsEnum.php

@ -6,6 +6,7 @@ enum KindsEnum: int
{ {
case METADATA = 0; // metadata, NIP-01 case METADATA = 0; // metadata, NIP-01
case TEXT_NOTE = 1; // text note, NIP-01, will not implement case TEXT_NOTE = 1; // text note, NIP-01, will not implement
case IMAGE = 20; // NIP-68, images
case FOLLOWS = 3; case FOLLOWS = 3;
case REPOST = 6; // Only wraps kind 1, NIP-18, will not implement 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 case GENERIC_REPOST = 16; // Generic repost, original kind signalled in a "k" tag, NIP-18

Loading…
Cancel
Save