diff options
| author | Adam Soltys <[email protected]> | 2026-06-06 09:14:11 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-06 09:14:11 -0700 |
| commit | 10284aa1b8868012829c0b643def73ee55e4822d (patch) | |
| tree | 225a3721b73b2dc5f0c33677b18b3c3ee86b5732 /routes | |
| parent | 8cb1882111c079cfac9870054d9917fa5f94de76 (diff) | |
| download | coinos-server-10284aa1b8868012829c0b643def73ee55e4822d.tar.gz coinos-server-10284aa1b8868012829c0b643def73ee55e4822d.zip | |
nwc: keep notifications opt-in (revert default-on)
Reverting the notify default-on from 8cb18821 — most users don't consume
notifications and defaulting on would flood the relay with payment_sent/
payment_received for ~3k apps. Notifications stay opt-in: clients enable by
sending notify:"true" when creating the NWC connection. The pay_invoice
reply-reliability and rate-limit fixes from 8cb18821 are unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/routes/users.ts b/routes/users.ts index e6f7f625..66d1504c 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -989,12 +989,11 @@ export default { if (app && uid !== app.uid) fail("Unauthorized"); if (secret) pubkey = getPublicKey(hexToBytes(secret)); - // Default notifications ON. The info event advertises payment_received/ - // payment_sent, but notify previously defaulted to false unless the client - // sent notify:"true" — which most don't — so the advertised notifications - // never fired (only ~1% of apps had it on). Only disable when explicitly - // set to "false". - notify = String(notify) !== "false"; + // Notifications are opt-in (default off): most users don't consume them and + // publishing payment_sent/payment_received for every app would flood the + // relay. A client enables them by sending notify:"true" when creating the + // connection. (Reverted a brief default-on change, 2026-06-06.) + notify = String(notify) === "true"; app = { ...app, |
