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:
parent
071c740145
commit
f4dbd3c843
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ export default function NostrNode({ rawText, bech32Id }: ComponentProps<Componen
|
||||||
if (!bech32Id) return { type: 'invalid', id: '' }
|
if (!bech32Id) return { type: 'invalid', id: '' }
|
||||||
try {
|
try {
|
||||||
const { type } = nip19.decode(bech32Id)
|
const { type } = nip19.decode(bech32Id)
|
||||||
if (type === 'npub') {
|
if (type === 'npub' || type === 'nprofile') {
|
||||||
return { type: 'mention', id: bech32Id }
|
return { type: 'mention', id: bech32Id }
|
||||||
}
|
}
|
||||||
if (type === 'nevent' || type === 'naddr' || type === 'note') {
|
if (type === 'nevent' || type === 'naddr' || type === 'note') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue