feat: add option to copy share link (#349)

This commit is contained in:
Daniel Omar Vergara Pérez 2025-05-23 00:47:26 -06:00 committed by GitHub
parent 6ee9cc1fd2
commit 0136515540
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 2 deletions

View file

@ -129,6 +129,10 @@ export function getSharableEventId(event: Event) {
return nip19.neventEncode({ id: event.id, author: event.pubkey, kind: event.kind, relays: hints })
}
export function getSharableEventLink(event: Event) {
return `https://njump.me/${getSharableEventId(event)}`
}
export function getUsingClient(event: Event) {
return event.tags.find(tagNameEquals('client'))?.[1]
}