fix: handle nprofile type in NostrNode for markdown embedded mentions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
codytseng 2026-03-12 22:18:15 +08:00
parent 071c740145
commit f4dbd3c843

View file

@ -8,7 +8,7 @@ export default function NostrNode({ rawText, bech32Id }: ComponentProps<Componen
if (!bech32Id) return { type: 'invalid', id: '' }
try {
const { type } = nip19.decode(bech32Id)
if (type === 'npub') {
if (type === 'npub' || type === 'nprofile') {
return { type: 'mention', id: bech32Id }
}
if (type === 'nevent' || type === 'naddr' || type === 'note') {