diff --git a/packages/system-react/package.json b/packages/system-react/package.json index 9fdde241..49d3f86a 100644 --- a/packages/system-react/package.json +++ b/packages/system-react/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system-react", - "version": "1.1.6", + "version": "1.1.7", "description": "React hooks for @snort/system", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/system/package.json b/packages/system/package.json index 6e030b6d..9f1b7651 100644 --- a/packages/system/package.json +++ b/packages/system/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system", - "version": "1.1.6", + "version": "1.1.7", "description": "Snort nostr system package", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/system/src/nostr-link.ts b/packages/system/src/nostr-link.ts index 6e53c657..38778431 100644 --- a/packages/system/src/nostr-link.ts +++ b/packages/system/src/nostr-link.ts @@ -52,8 +52,16 @@ export class NostrLink implements ToNostrEventTag { } } - toEventTag() { + toEventTag(marker?: string) { const relayEntry = this.relays ? [this.relays[0]] : []; + + if (marker) { + if (relayEntry.length === 0) { + relayEntry.push(""); + } + relayEntry.push(marker); + } + if (this.type === NostrPrefix.PublicKey || this.type === NostrPrefix.Profile) { return ["p", this.id, ...relayEntry]; } else if (this.type === NostrPrefix.Note || this.type === NostrPrefix.Event) {