Voice: per-room voice flag — make a room VC or text-only#327
Open
hardlygospel wants to merge 1 commit into
Open
Voice: per-room voice flag — make a room VC or text-only#327hardlygospel wants to merge 1 commit into
hardlygospel wants to merge 1 commit into
Conversation
Voice was a single server-wide channel with no per-room control. This adds the control plane to mark individual rooms as voice-enabled (VC) or text-only: - New column chat_rooms.voice_enabled (migration 074, defaults false so every existing room stays text-only until a mod turns it on) plus the model field and a ChatRoom::set_voice_enabled setter. - New /mod command 'room-voice #room <on|off>', gated by a new SET_ROOM_VOICE cap (granted to moderators), written to the audit log, with help text. 'view #room' now shows the voice flag. This is the per-room control + data layer. Giving each enabled room its own separate call (room-keyed LiveKit rooms) is a follow-up: it needs matching changes in the native CLI and the browser listener, which both currently join one fixed room over the websocket/HTTP. 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 is currently a single server-wide channel with no per-room control. This adds the control plane to make a room VC or text-only:
room-voice #room on/room-voice #room offin the/modconsole.view #roomnow shows the room'svoice: on/offflag.How
chat_rooms.voice_enabledcolumn (migration074), defaults tofalseso every existing room stays text-only until a moderator opts it in. Model gains the field and aChatRoom::set_voice_enabledsetter.rename-room— newRoomVoice { slug, enabled }command, a newSET_ROOM_VOICEcapability granted to moderators, an audit-log entry, and help text (help room-voice).Scope / follow-up
This is the per-room control + data layer — the part that makes "a room is VC or not" a real, mod-managed property. Giving each enabled room its own separate call (room-keyed LiveKit rooms instead of the one shared channel) is a deliberate follow-up: voice presence and join/listen tickets are currently keyed to one fixed room over the native CLI websocket and the browser listener HTTP endpoint, so true per-room calls need matching changes on both clients. I kept this PR server-side and migration-light so the flag can land and be built on.
Tests
room-voice #x on/offparse correctly and reject missing/invalid state.cargo build+ the moderation/chat/room-search suites pass; no new clippy warnings.Thanks 🙏