Skip to content

feature: relay say_team into the team's web chat room - #196

Merged
lukepolo merged 5 commits into
mainfrom
feature/team-chat-relay
Sep 29, 2026
Merged

lukepolo merged 5 commits into
mainfrom
feature/team-chat-relay

Conversation

@lukepolo

@lukepolo lukepolo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Relays in-game say_team into the speaker's private team room on the web (CSS + Swiftly), without letting a team line reach the room the other team reads.

  • CSS registers a say_team listener ahead of GagPlayer; the Swiftly chat hook no longer skips team chat
  • MatchUtility.TeamChatEvent makes the whole decision: only when the api sends relay_team_chat, never for a gagged speaker, only when a lineup resolves; otherwise nothing is sent (no fallback to chat)
  • Lineup lookup order: exact steam id, then coach seat (only with coaches enabled, works from Spectator), then placeholder name prefix
  • Team lines go out as their own teamChat event (player, message, lineupId); all chat stays chat with player, message
  • The team handler returns Continue, so GagPlayer still blocks a gagged speaker in game

Merge/deploy: deploy 5stackgg/api#448 first. Team lines use their own teamChat event, 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-open chat fallback, and relaying without relay_team_chat. Manual QA: say_team from 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.

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.
@lukepolo

Copy link
Copy Markdown
Contributor Author

api side: 5stackgg/api#448 — deploy the api first; the plugin only relays when relay_team_chat is advertised.

@lukepolo
lukepolo merged commit 094e8e1 into main Sep 29, 2026
3 checks passed
@lukepolo
lukepolo deleted the feature/team-chat-relay branch September 29, 2026 00:26
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.

1 participant