From 1da40523fc00b9963012abe067a6c4910c7578b6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 1 Oct 2026 12:35:15 -0700 Subject: Zaps and reactions get their own notification switches. The notifier now watches kind-7 reactions p-tagged at the user (opt-in by an explicit flag, so older apps that can't word them stay quiet) and sends zap receipts as 'zap' to apps that report the category, 'payment' to older ones. Coinos zap receipts carry their amount into the push. The service worker names the reactor when it knows them and stays quiet for a muted one. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VP5Ljqk7EYcm5QQAbzDwog --- src/features/messages.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index 89e9425..4fcff22 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -2016,7 +2016,8 @@ export function messagesFeature(ctx) { // per-category opt-outs travel with the registration so the notifier // never sends what the user turned off (a suppressed-but-delivered push // would earn Chrome's generic "updated in background" nag instead) - const reasons = { payment: s.reasons?.payment !== false, dm: s.reasons?.dm !== false, mention: s.reasons?.mention !== false }; + const want = (k) => s.reasons?.[k] !== false; + const reasons = { payment: want('payment'), zap: want('zap'), dm: want('dm'), mention: want('mention'), reaction: want('reaction') }; // Stamp the network: the same seed makes the same nostr pubkey on mainnet // AND staging, so without this the notifier fans a mainnet payment push // out to the staging PWA's subscription too — and tapping it opened @@ -2076,8 +2077,10 @@ export function messagesFeature(ctx) { } }, t('notifEnable')) : h('div', { class: 'small faint' }, t('notifOnDevice')), rowT(t('notifPayRecv'), 'payment'), + rowT(t('notifZap'), 'zap'), rowT(t('notifDm'), 'dm'), rowT(t('notifMention'), 'mention'), + rowT(t('notifReaction'), 'reaction'), h('div', { class: 'small faint' }, t('notifChatHint'))); } -- cgit v1.2.3