mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 15:36:53 +02:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user