Browse Source

Fix parser

(cherry picked from commit 3895dce3f18ca145635c0fa2f16d3d93ae2d8c01)
imwald
Nuša Pukšič 5 months ago
parent
commit
164816b9f2
  1. 6
      src/Util/CommonMark/NostrSchemeExtension/NostrSchemeParser.php

6
src/Util/CommonMark/NostrSchemeExtension/NostrSchemeParser.php

@ -9,6 +9,8 @@ use nostriphant\NIP19\Bech32; @@ -9,6 +9,8 @@ use nostriphant\NIP19\Bech32;
use nostriphant\NIP19\Data\NAddr;
use nostriphant\NIP19\Data\NEvent;
use nostriphant\NIP19\Data\NProfile;
use nostriphant\NIP19\Data\NPub;
class NostrSchemeParser implements InlineParserInterface
{
@ -36,7 +38,9 @@ class NostrSchemeParser implements InlineParserInterface @@ -36,7 +38,9 @@ class NostrSchemeParser implements InlineParserInterface
switch ($decoded->type) {
case 'npub':
$inlineContext->getContainer()->appendChild(new NostrMentionLink(null, $decoded->data));
/** @var NPub $decoded */
$decoded = $decoded->data;
$inlineContext->getContainer()->appendChild(new NostrMentionLink(null, $decoded->data->data));
break;
case 'nprofile':
/** @var NProfile $decodedProfile */

Loading…
Cancel
Save