diff --git a/js/nostrEventSchemas.js b/js/nostrEventSchemas.js index 970fd11a..730a94bb 100644 --- a/js/nostrEventSchemas.js +++ b/js/nostrEventSchemas.js @@ -716,6 +716,10 @@ export function buildRepostEvent({ return schema?.kind ?? 6; })(); + if (resolvedKind === 16 && normalizedTargetKind !== null) { + tags.push(["k", String(normalizedTargetKind)]); + } + return { kind: resolvedKind, pubkey, diff --git a/tests/nostr/publishHelpers.test.mjs b/tests/nostr/publishHelpers.test.mjs index d182bf36..edb5cb4d 100644 --- a/tests/nostr/publishHelpers.test.mjs +++ b/tests/nostr/publishHelpers.test.mjs @@ -1,7 +1,9 @@ import assert from "node:assert/strict"; import test from "node:test"; -const { mirrorVideoEvent } = await import("../../js/nostr/publishHelpers.js"); +const { mirrorVideoEvent, repostEvent } = await import( + "../../js/nostr/publishHelpers.js", +); const resolveActiveSignerStub = () => ({ signEvent: async (event) => ({