Skip to content
/ api Public

Fix excessive notifications on match start/end#111

Merged
lukepolo merged 3 commits intomainfrom
fix/excessive-notifications
Mar 6, 2026
Merged

Fix excessive notifications on match start/end#111
lukepolo merged 3 commits intomainfrom
fix/excessive-notifications

Conversation

@Flegma
Copy link
Contributor

@Flegma Flegma commented Mar 6, 2026

Summary

  • Filter match status notifications to only meaningful statuses: WaitingForCheckIn, Live, Finished, Tie, Canceled, Forfeit, Surrendered (skips PickingPlayers, Scheduled, WaitingForServer, Veto)
  • Fix admin Hasura permission that used role IS NOT NULL (matched every notification in the system) to role = administrator

Test plan

  • Start a match — verify only WaitingForCheckIn and Live notifications appear (not Scheduled, WaitingForServer, Veto)
  • End a match — verify only Finished/Tie notification appears
  • As admin — verify only personal + administrator-role notifications are visible, not every player's notifications
  • Verify Discord webhook notifications still fire for the whitelisted statuses

Fixes 5stackgg/5stack-panel#347

Flegma added 3 commits March 6, 2026 08:40
Filters notifications to: WaitingForCheckIn, Live, Finished, Tie,
Canceled, Forfeit, Surrendered. Skips PickingPlayers, Scheduled,
WaitingForServer, Veto.

Fixes #347
Moves the status whitelist to utilities/constants.ts alongside other
notification constants. Uses ReadonlySet for immutability.
Previously used 'role IS NOT NULL' which matched every notification
in the system. Now admins only see their personal notifications plus
those with role=administrator.

Fixes #347
@Flegma Flegma requested a review from lukepolo March 6, 2026 08:26
@lukepolo lukepolo merged commit c2868fb into main Mar 6, 2026
1 check passed
@lukepolo lukepolo deleted the fix/excessive-notifications branch March 6, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Excessive Notifications on Single Match Start , End

2 participants