fix: use host outbox relays for NIP-53 live chat events

Combine activity relays, naddr hints, and host's outbox relays when
subscribing to chat messages and zaps. This ensures events are fetched
from all relevant sources where they may be published.
This commit is contained in:
Claude
2026-01-12 11:46:59 +00:00
parent 14c573a781
commit 86b41f7504

View File

@@ -175,9 +175,10 @@ export class Nip53Adapter extends ChatProtocolAdapter {
participants.unshift({ pubkey: hostPubkey, role: "host" });
}
// Determine relays for chat - prefer activity's relays tag, fallback to relay hints
const chatRelays =
activity.relays.length > 0 ? activity.relays : relayHints;
// Combine activity relays, relay hints, and host outboxes for comprehensive coverage
const chatRelays = [
...new Set([...activity.relays, ...relayHints, ...authorOutboxes]),
];
console.log(
`[NIP-53] Resolved: "${activity.title}" (${status}), ${participants.length} participants, ${chatRelays.length} relays`,