aboutsummaryrefslogtreecommitdiffstats
path: root/nwcpush/server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-18 09:01:17 -0700
committerAdam Soltys <[email protected]>2026-10-18 09:01:17 -0700
commit56cad7ef0da868e7c7c2b3c902143acd611b4c48 (patch)
tree64d7b789b2194304381606d8e4d7e65af8379631 /nwcpush/server.js
parent2e897103836a6814a39dbb905d6a7ed1417344d7 (diff)
downloadcoinosv3-server-56cad7ef0da868e7c7c2b3c902143acd611b4c48.tar.gz
coinosv3-server-56cad7ef0da868e7c7c2b3c902143acd611b4c48.zip
nwcpush: calls push only to an app that says it rings for them (reasons.call), not to an older one whose worker would show a call as chat.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg
Diffstat (limited to 'nwcpush/server.js')
-rw-r--r--nwcpush/server.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/nwcpush/server.js b/nwcpush/server.js
index 198757c..947b52e 100644
--- a/nwcpush/server.js
+++ b/nwcpush/server.js
@@ -213,8 +213,10 @@ function onNotifyEvent(ev) {
if (ev.kind === CALL_WRAP) {
if (!p || String(ev.content || '').length < CALL_OFFER_MIN) return;
keepCallWrap(ev);
+ // only to an app that says it rings for calls (reasons.call): an older
+ // one's worker has no words for a call and would call it chat
for (const [id, r] of Object.entries(notifyRegs)) {
- if ((r.ptags || []).includes(p)) pushNotify(id, r, 'call', { wrapId: ev.id }).catch(() => {});
+ if (r.reasons?.call === true && (r.ptags || []).includes(p)) pushNotify(id, r, 'call', { wrapId: ev.id }).catch(() => {});
}
return;
}