From 10284aa1b8868012829c0b643def73ee55e4822d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 6 Jun 2026 09:14:11 -0700 Subject: nwc: keep notifications opt-in (revert default-on) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- routes/users.ts | 11 +++++------ 1 file 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, -- cgit v1.2.3