feature: informational warning sanction - #436
Merged
Merged
Conversation
…upport notification text - reply to the web client's ping with a pong so a dead-but-OPEN socket is detectable - only a ban notifies former team-mates; mutes/gags/silences stay between the player and staff - only administrators can delete a player row - check-in error names team admins as well as the captain - name change requests link the player's profile (absolute url, Discord-routed) - match support notification names the requester, fixes the title typo, and requires the caller be in the lineup
lukepolo
force-pushed
the
bug/deafcs-sync-fixes
branch
from
September 28, 2026 21:44
95d14bd to
95853a0
Compare
- new `warning` sanction type: requires a reason, never expires (tbiu trigger nulls remove_sanction_date), never touches a server - getActiveServerSanctions only serves ban/mute/gag/silence to the plugin - unsanctionServerPlayer takes an optional sanction_id; a warning can only be removed by id - PlayerWarning notification to the warned player only (account push category, instant-unseen, off Discord, not mutable in the bell) - warnings are hidden from guests and other players, visible to the warned player and moderators; excluded from the search sanction count - generated types hand-patched for the new enum values and action arg
- removing a sanction by id fails with "sanction not found" when no row matched instead of reporting success - search sanction count lists the enforced types rather than naming `warning`, so indexing survives a Hasura that has not reloaded the enum yet - SanctionType and the enforced-type list live in sanction-types.ts; importing SanctionsService from type-sense would have closed a cycle through RconService
lukepolo
force-pushed
the
feature/warning-sanction
branch
from
September 28, 2026 21:55
58bf34e to
0ba2cd3
Compare
# Conflicts: # generated/schema.ts # hasura/enums/notification-types.sql # src/hasura/metadata-permissions.spec.ts # src/notifications/notifications.service.spec.ts # test/notifications.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.
Adds an informational
warningsanction: a note on a player's record that is never enforced, never expires, and can only be seen by the player and by moderators.warningtype. It requires a reason, skips RCON and server sync, and sets no ban/mute/gag flags. A trigger forcesremove_sanction_dateto NULL.unsanctiontakes an optionalsanction_id. A warning must be removed by id, and the call fails with "sanction not found" if no row matched.sanctionscount only include ban/mute/gag/silence.PlayerWarningnotification. It never goes to Discord or to team-mates.Merge/deploy: stacked on #432 (merge that first); ship with web#621. After deploy: api boot →
yarn hasura:metadata→ Hasura metadata reload →yarn codegen.Tests: sanction-not-found, the refusal to clear warnings by type, the plugin-feed filter, the end-date trigger, the visibility permissions and the search count (new test) each fail without their code. Manual QA: after the metadata reload, warn a player, then confirm they get the notification and a signed-out visitor can't see the warning. Based on DEAFCS 0c961eb, 1c21cb5