aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-01 12:35:15 -0700
committerAdam Soltys <[email protected]>2026-10-01 12:35:15 -0700
commit1da40523fc00b9963012abe067a6c4910c7578b6 (patch)
tree396b8fc8a66989fc56e61ad1370011b40cf93027 /src/features
parent509d632595399bc355fcf3826875214dc9d3b68c (diff)
downloadcoinosv3-1da40523fc00b9963012abe067a6c4910c7578b6.tar.gz
coinosv3-1da40523fc00b9963012abe067a6c4910c7578b6.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP5Ljqk7EYcm5QQAbzDwog
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js5
1 files changed, 4 insertions, 1 deletions
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')));
}