feature: relay say_team into the team's web chat room - #196
Merged
Merged
Conversation
Team chat is published with teamOnly + lineupId only when the api advertises relay_team_chat, so a newer plugin never leaks team chat into the shared match room of an older api. Coaches resolve to their lineup even while seated on spectator; gagged speakers are never relayed.
Moves the relay_team_chat gate, gag check and lineup lookup into MatchUtility.GetTeamChatRelayLineupId so the leak rules are tested in both plugins. Exact steam ids resolve before placeholder name prefixes, coaches only resolve when the match allows coaches, and the chat payload shape is pinned by tests.
Contributor
Author
|
api side: 5stackgg/api#448 — deploy the api first; the plugin only relays when relay_team_chat is advertised. |
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.
Relays in-game
say_teaminto the speaker's private team room on the web (CSS + Swiftly), without letting a team line reach the room the other team reads.say_teamlistener ahead ofGagPlayer; the Swiftly chat hook no longer skips team chatMatchUtility.TeamChatEventmakes the whole decision: only when the api sendsrelay_team_chat, never for a gagged speaker, only when a lineup resolves; otherwise nothing is sent (no fallback tochat)teamChatevent (player,message,lineupId); all chat stayschatwithplayer,messageContinue, soGagPlayerstill blocks a gagged speaker in gameMerge/deploy: deploy 5stackgg/api#448 first. Team lines use their own
teamChatevent, so an older api drops them.Tests: proven by tests that fail without the fix: a placeholder prefix claiming another lineup's player or coach, a coach resolved with coaches disabled, a gagged member shadowed by a placeholder, team lines sent as
chat, the fail-openchatfallback, and relaying withoutrelay_team_chat. Manual QA:say_teamfrom a player and from a Spectator coach shows up only in their own team room; a gagged player's is blocked in game and not relayed. Based on DEAFCS adad160.