mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 16:48:50 +00:00
maybe fix a bug with calling sub.sub()
This commit is contained in:
7
pool.js
7
pool.js
@@ -26,10 +26,9 @@ export function relayPool() {
|
||||
|
||||
const activeSubscriptions = {}
|
||||
|
||||
const sub = (
|
||||
{cb, filter, beforeSend},
|
||||
id = Math.random().toString().slice(2)
|
||||
) => {
|
||||
const sub = ({cb, filter, beforeSend}, id) => {
|
||||
if (!id) id = Math.random().toString().slice(2)
|
||||
|
||||
const subControllers = Object.fromEntries(
|
||||
Object.values(relays)
|
||||
.filter(({policy}) => policy.read)
|
||||
|
||||
Reference in New Issue
Block a user