feature: urgent push for match found and incoming admin calls - #443
Merged
Merged
Conversation
A found match and an admin starting a camera call now push to the player's
devices through the normal notifications pipeline, as push-only rows
(in_app = false) that never reach the bell.
- MatchFound / AdminCall notification types, their own push categories
(match_found, admin_call; on by default)
- "urgent" delivery policy: sent at once, through quiet hours, with
TTL 30 / Urgency high on the web-push request and urgent + ttl in the
payload for the service worker
- notifyPlayers({ inApp: false }) writes rows only for subscribed players
- matchmaking pushes every player when a ready check starts and deletes
the rows when the confirmation is removed; never blocks the ready check
- an admin's talk publish rings the player once per call (redis NX 60s);
hanging up retracts and re-arms, the player answering retracts
- ring only for an admin/organizer caller, and only a roster player or coach of a match still being played; an organizer's "all" scope never checked the target, so any match organizer could push to anyone - the ring guard outlives a hangup (one ring per player per match a minute), so publish-then-hangup cannot be looped - urgent fan-outs claim their rows and send directly instead of waiting behind the single-concurrency broadcast worker - accepting a ready check retracts that player's MatchFound row - escape the match label in the AdminCall message; a new ring replaces the previous row for that player and match - expiresAt in urgent payloads for the service worker
lukepolo
force-pushed
the
feature/match-found-push
branch
from
September 28, 2026 22:00
508debc to
e6d4182
Compare
# Conflicts: # src/notifications/notifications.service.spec.ts
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.
Sends an urgent native push when a matchmaking ready check starts ("Match found") and when an admin starts talking to a player from the camera grid ("Admin is calling you").
MatchFound/AdminCalltypes, each with its own push category. They use anurgentdelivery policy: TTL 30s,Urgency: high, sent through quiet hours, no buttons. The payload addsurgent,ttlandexpiresAt.in_app = false), so they never reach the bell. Urgent fan-outs are sent directly instead of queueing behind the broadcast worker.Merge/deploy: pairs with web#623; run
hasura metadata reloadafter deploy (newis_enumvalues).Tests: the caller/target gate, the hangup re-arm guard, the unqueued urgent send, the accept retraction, label escaping, replacing the previous ring, TTL/urgency, the quiet-hours bypass and
expiresAteach fail without their code. Manual QA: queue with 5stack in the background on an Android phone and confirm it rings. Keep the phone offline for more than 30s and confirm no stale "Match found" arrives. Based on DEAFCS be753fc, 2c3ca70