diff options
| author | Adam Soltys <[email protected]> | 2026-08-01 12:30:57 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-01 12:30:57 -0700 |
| commit | 1dfa0ccb22dd6840705a95f6e0fc56523bd6760a (patch) | |
| tree | 5808e70144221346dcdb84c543c0a87190d5d0d8 | |
| parent | 4757b1bf8e9c449368c132e05ba9be20ef0c28cd (diff) | |
| download | coinosv3-server-1dfa0ccb22dd6840705a95f6e0fc56523bd6760a.tar.gz coinosv3-server-1dfa0ccb22dd6840705a95f6e0fc56523bd6760a.zip | |
Pass a single filter to subscribeMany — arrays are rejected by relays
nostr-tools ≥2.23 changed subscribeMany to take one filter object; the
old array form now serializes as ["REQ",id,[{...}]], which every relay
answers with CLOSED "provided filter is not an object". That killed the
NWC request subscription (the Amethyst forever-spinner), the device-sync
live subscription, and the push notifier's relay watch — all silently.
Co-Authored-By: Claude Fable 5 <[email protected]>
| -rw-r--r-- | nwcpush/server.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nwcpush/server.js b/nwcpush/server.js index feca109..a2164d6 100644 --- a/nwcpush/server.js +++ b/nwcpush/server.js @@ -79,8 +79,10 @@ function resubscribe() { lastResub = Date.now(); sub = pool.subscribeMany( RELAYS, - // only live traffic: a replayed old request must not wake devices - [{ kinds: [REQ_KIND], '#p': pks, since: Math.floor(Date.now() / 1000) }], + // only live traffic: a replayed old request must not wake devices. + // NOTE: nostr-tools ≥2.23 wants a single filter object, NOT an array — + // an array serializes as an invalid REQ that relays reject with CLOSED. + { kinds: [REQ_KIND], '#p': pks, since: Math.floor(Date.now() / 1000) }, { onevent: (ev) => { const target = ev.tags?.find((t) => t[0] === 'p')?.[1]; |
