nip19: remove note1.

This commit is contained in:
Asai Toshiya
2024-11-19 23:22:26 +09:00
committed by fiatjaf_
parent 43ce7f9377
commit b22e2465cc
6 changed files with 29 additions and 57 deletions

View File

@@ -9,7 +9,7 @@ type Reference = {
address?: AddressPointer
}
const mentionRegex = /\bnostr:((note|npub|naddr|nevent|nprofile)1\w+)\b|#\[(\d+)\]/g
const mentionRegex = /\bnostr:((npub|naddr|nevent|nprofile)1\w+)\b|#\[(\d+)\]/g
export function parseReferences(evt: Event): Reference[] {
let references: Reference[] = []
@@ -33,13 +33,6 @@ export function parseReferences(evt: Event): Reference[] {
})
break
}
case 'note': {
references.push({
text: ref[0],
event: { id: data as string, relays: [] },
})
break
}
case 'nevent': {
references.push({
text: ref[0],