parent
33db3b2c79
commit
b6618dd66a
@ -93,7 +93,7 @@ export function parseEmbedUrl (href) {
|
||||
const { hostname, pathname, searchParams } = new URL(href)
|
||||
|
||||
// nostr prefixes: [npub1, nevent1, nprofile1, note1]
|
||||
const nostr = href.match(/(?<id>(?<type>npub1|nevent1|nprofile1|note1|naddr1)[02-9ac-hj-np-z]+)/)
|
||||
const nostr = href.match(/\/(?<id>(?<type>npub1|nevent1|nprofile1|note1|naddr1)[02-9ac-hj-np-z]+)/)
|
||||
if (nostr?.groups?.id) {
|
||||
let id = nostr.groups.id
|
||||
if (nostr.groups.type === 'npub1') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user