mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
Update pool.js
This commit is contained in:
4
pool.js
4
pool.js
@@ -53,12 +53,12 @@ export function relayPool() {
|
|||||||
}) => {
|
}) => {
|
||||||
Object.entries(subControllers).map(([relayURL, sub]) => [
|
Object.entries(subControllers).map(([relayURL, sub]) => [
|
||||||
relayURL,
|
relayURL,
|
||||||
sub.sub({cb: event => cb(event, relayURL), filter, beforeSend}, id)
|
sub.sub({ cb: event => cb(event, relayURL), filter, beforeSend }, id)
|
||||||
])
|
])
|
||||||
return activeSubscriptions[id]
|
return activeSubscriptions[id]
|
||||||
}
|
}
|
||||||
const addRelay = relay => {
|
const addRelay = relay => {
|
||||||
subControllers[relay.url] = relay.sub({cb: event => cb(event, relay.url), filter}, id)
|
subControllers[relay.url] = relay.sub({ cb: event => cb(event, relay.url), filter, beforeSend }, id)
|
||||||
return activeSubscriptions[id]
|
return activeSubscriptions[id]
|
||||||
}
|
}
|
||||||
const removeRelay = relayURL => {
|
const removeRelay = relayURL => {
|
||||||
|
|||||||
Reference in New Issue
Block a user