feat: improve the relays used for sending replies
This commit is contained in:
parent
e7cb7342aa
commit
e6516d7acd
4 changed files with 48 additions and 14 deletions
|
|
@ -108,8 +108,9 @@ class ClientService extends EventTarget {
|
|||
}
|
||||
|
||||
async publishEvent(relayUrls: string[], event: NEvent) {
|
||||
const uniqueRelayUrls = Array.from(new Set(relayUrls))
|
||||
const result = await Promise.any(
|
||||
relayUrls.map(async (url) => {
|
||||
uniqueRelayUrls.map(async (url) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const that = this
|
||||
const relay = await this.pool.ensureRelay(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue