Voice: moderator kick/unblock from the mod console#326
Open
hardlygospel wants to merge 1 commit into
Open
Conversation
Voice had no moderation path: a disruptive user in the call couldn't be removed. Add 'kick voice @user' and 'unban voice @user' to the /mod console. - VoiceService gains a runtime block set: kick() removes a user now and blocks rejoin, enforced at the token gate (join_ticket refuses, so a blocked user genuinely can't publish or subscribe) and on self-reported presence. allow() lifts it. Runtime-only by design; clears on restart. - New caps KICK_FROM_VOICE / UNBLOCK_VOICE (granted to moderators), gated per-target like the other surfaces, with an audit-log entry. - Wired through the existing kick/unban grammar, help text, and the shared VoiceService passed into ModerationInfra. Tests cover the token-gate enforcement, roster removal/stickiness, and command parsing. Signed-off-by: Tony Hosaroygard <tasmaniamate@gmail.com>
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.
What
Voice had no moderation path — a disruptive user in the call couldn't be removed. This adds two commands to the
/modconsole:kick voice @user [reason]— removes the user from voice now and blocks them from rejoining.unban voice @user [reason]— lifts the block.How it's enforced
The shared
VoiceServicegains a runtime block set:kick()drops the user from the roster and records the block. Enforcement is the LiveKit token gate:join_ticketrefuses a blocked user, so they genuinely can't publish or subscribe — not just hidden from the roster. Self-reported presence from a blocked client is also dropped.allow()lifts the block.voice_bantable with durations could be a follow-up if you'd like persistence — I kept this PR migration-free.Wiring
KICK_FROM_VOICE/UNBLOCK_VOICE, granted to moderators, gated per target tier like every other surface, and written to the moderation audit log.kick/unbangrammar and/modhelp text (help kick voice,help unban voice), so it reads exactly like the server/room/audio actions already do.VoiceServiceis threaded intoModerationInfraalongside the existing artboard handles.Tests
VoiceService: token-gate denial while blocked, roster removal, and that a blocked client re-reporting presence stays out.kick voice/unban voiceparse to the right action and require a target.cargo build -p late-sshand the voice + moderation test suites are green; no new clippy warnings.Thanks 🙏