From b42e4e7efcdbdb4588cc7e534470de9abc5721e0 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Jan 2026 18:58:58 +0000 Subject: [PATCH] fix: use semantic author for reaction relay selection Use getSemanticAuthor() to determine the target pubkey for relay selection. This ensures reactions to zaps notify the zapper (not the lightning service) and reactions to streams notify the host. --- src/components/nostr/kinds/BaseEventRenderer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/nostr/kinds/BaseEventRenderer.tsx b/src/components/nostr/kinds/BaseEventRenderer.tsx index 91afdc2..6b36d11 100644 --- a/src/components/nostr/kinds/BaseEventRenderer.tsx +++ b/src/components/nostr/kinds/BaseEventRenderer.tsx @@ -552,7 +552,9 @@ export function BaseEventContainer({ const signed = await factory.sign(draft); // Select relays per NIP-65: author's outbox + target's inbox - const relays = await selectRelaysForInteraction(pubkey, event.pubkey); + // Use semantic author (e.g., zapper for zaps, host for streams) + const targetPubkey = getSemanticAuthor(event); + const relays = await selectRelaysForInteraction(pubkey, targetPubkey); await publishEventToRelays(signed, relays); } catch (err) { console.error("[BaseEventContainer] Failed to send reaction:", err);