diff --git a/src/Util/CommonMark/NostrSchemeExtension/NostrMentionParser.php b/src/Util/CommonMark/NostrSchemeExtension/NostrMentionParser.php index f90375e..6c24682 100644 --- a/src/Util/CommonMark/NostrSchemeExtension/NostrMentionParser.php +++ b/src/Util/CommonMark/NostrSchemeExtension/NostrMentionParser.php @@ -42,7 +42,6 @@ readonly class NostrMentionParser implements InlineParserInterface $npubLink = substr($fullMatch, strpos($fullMatch, 'npub1'), -1); // e.g., "npubXXXX" if (empty($label)) { - $metadata = $this->redisCacheService->getMetadata($this->nostrKeyUtil->npubToHex($npubLink)); $label = $metadata->display_name ?? $metadata->name; } diff --git a/src/Util/CommonMark/NostrSchemeExtension/NostrSchemeParser.php b/src/Util/CommonMark/NostrSchemeExtension/NostrSchemeParser.php index 3623611..5a77701 100644 --- a/src/Util/CommonMark/NostrSchemeExtension/NostrSchemeParser.php +++ b/src/Util/CommonMark/NostrSchemeExtension/NostrSchemeParser.php @@ -93,13 +93,7 @@ class NostrSchemeParser implements InlineParserInterface $event = $this->nostrClient->getEventById($decodedEvent->id, $decodedEvent->relays); if ($event) { - // Get author metadata if available - $authorMetadata = null; - if (isset($event->pubkey)) { - $key = new Key(); - $npub = $key->convertPublicKeyToBech32($event->pubkey); - $authorMetadata = $this->redisCacheService->getMetadata($npub); - } + $authorMetadata = $this->redisCacheService->getMetadata($event->pubkey); // Render the embedded event card $eventCardHtml = $this->twig->render('components/event_card.html.twig', [