feature: vibrate and hold urgent match-found and admin-call pushes - #623
Merged
Merged
Conversation
… ready-check rings, only hang up a joined call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes "Match found" and "Admin is calling you" pushes ring (vibrate and stay on screen) and takes the ring down when it expires or is answered on this device.
sw-push.js: anurgentpush getsrequireInteractionand vibration;expiresAtcloses it on a plain timer outsidewaitUntil(a ring closed inside it counts as a silent push), clamped to 5–60s and matched onexpiresAtso a superseded timer can't close its replacementcloseNotifications(tag)andnotificationThreadKey(); the ready check closesMatchFound:<id>on every update after accepting, so a push that lands late is still closeduseCameraTalkback: closesAdminCall:<matchId>once the talkback plays, reports the call as presence focus (clearing stale focus on mount), and only hangs up if this tab connectedmatch_foundandadmin_callpush toggles; the quiet-hours text says they ring anyway (all locales)Merge/deploy: pairs with api#443; safe to ship first (the new fields are ignored until the api sends them).
Tests: the silent-push close timing, the 5s floor for a clock running ahead, a superseded timer closing its replacement, a ring landing after accepting, hanging up from a tab that never connected, and stale focus on the camera page all fail without the fix. Based on DEAFCS af80eb4, 0d3fbe8