mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
bump version.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "0.23.3",
|
"version": "0.23.4",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
9
pool.js
9
pool.js
@@ -34,7 +34,7 @@ export function relayPool() {
|
|||||||
.filter(({policy}) => policy.read)
|
.filter(({policy}) => policy.read)
|
||||||
.map(({relay}) => [
|
.map(({relay}) => [
|
||||||
relay.url,
|
relay.url,
|
||||||
relay.sub({ cb: event => cb(event, relay.url), filter, beforeSend}, id)
|
relay.sub({cb: event => cb(event, relay.url), filter, beforeSend}, id)
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -53,12 +53,15 @@ 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, beforeSend }, 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