Use default relays and explicit relays
This commit is contained in:
parent
0c2f669017
commit
1e5b573045
@ -225,8 +225,9 @@ export class NostrSystem extends ExternalStore<SystemSnapshot> implements System
|
||||
}
|
||||
} else {
|
||||
const ret = [];
|
||||
for (const [, s] of this.#sockets) {
|
||||
for (const [a, s] of this.#sockets) {
|
||||
if (!s.Ephemeral) {
|
||||
this.#log("Sending query to %s %O", a, qSend);
|
||||
const qt = q.sendToRelay(s, qSend);
|
||||
if (qt) {
|
||||
ret.push(qt);
|
||||
|
@ -222,7 +222,9 @@ export class RequestFilterBuilder {
|
||||
build(relays: RelayCache, id: string): Array<BuiltRawReqFilter> {
|
||||
// use the explicit relay list first
|
||||
if (this.#relays.size > 0) {
|
||||
return [...this.#relays].map(r => {
|
||||
// always query our default relay lists too when using explicit relays
|
||||
// these explicit relays may not always be available
|
||||
return [...this.#relays, ""].map(r => {
|
||||
return {
|
||||
filters: [this.#filter],
|
||||
relay: r,
|
||||
|
Loading…
x
Reference in New Issue
Block a user