Browse Source

Fix parser

imwald
Nuša Pukšič 10 months ago
parent
commit
3895dce3f1
  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