mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-06 10:41:21 +02:00
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:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user