diff options
| author | Adam Soltys <[email protected]> | 2026-10-18 09:01:17 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-18 09:01:17 -0700 |
| commit | 56cad7ef0da868e7c7c2b3c902143acd611b4c48 (patch) | |
| tree | 64d7b789b2194304381606d8e4d7e65af8379631 /nwcpush | |
| parent | 2e897103836a6814a39dbb905d6a7ed1417344d7 (diff) | |
| download | coinosv3-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')
| -rw-r--r-- | nwcpush/server.js | 4 |
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; } |
