Skip to content

Voice: per-room voice flag — make a room VC or text-only#327

Open
hardlygospel wants to merge 1 commit into
mpiorowski:mainfrom
hardlygospel:feat/per-room-voice
Open

Voice: per-room voice flag — make a room VC or text-only#327
hardlygospel wants to merge 1 commit into
mpiorowski:mainfrom
hardlygospel:feat/per-room-voice

Conversation

@hardlygospel
Copy link
Copy Markdown
Contributor

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 off in the /mod console.
  • view #room now shows the room's voice: on/off flag.

How

  • Schema: new chat_rooms.voice_enabled column (migration 074), defaults to false so every existing room stays text-only until a moderator opts it in. Model gains the field and a ChatRoom::set_voice_enabled setter.
  • Command: folded into the moderation module exactly like rename-room — new RoomVoice { slug, enabled } command, a new SET_ROOM_VOICE capability 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

  • Command parser: room-voice #x on/off parse correctly and reject missing/invalid state.
  • Existing chat/room-search suites updated for the new model field and stay green.

cargo build + the moderation/chat/room-search suites pass; no new clippy warnings.

Thanks 🙏

  • mat (@mpiorowski) — for late.sh, and for the voice + moderation foundations this extends. The room model and mod-command framework made this a small, clean addition. Thank you.

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>
@hardlygospel hardlygospel requested a review from mpiorowski as a code owner June 7, 2026 02:47
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