refactor: remove USE_VOICE_ACTIVITY dead code and enforce STREAM permission in VoiceControlBar

Remove the unused USE_VOICE_ACTIVITY permission bit (was bit 25) and shift
STREAM to bit 25, DISCONNECT_MEMBERS to bit 26. Add a database migration to
remap stored permission values. Gate camera and screen share buttons in
VoiceControlBar behind canSpeak/canStream, matching VoiceControls behavior.
This commit is contained in:
Jannis Braun
2026-03-10 15:46:59 +01:00
parent ce63c5ed36
commit 2755cc0aac
5 changed files with 132 additions and 35 deletions
+2 -3
View File
@@ -615,9 +615,8 @@ Bitwise permission engine defined in `packages/shared/src/permissions.ts`. Store
| 22 | MUTE_MEMBERS | Server-mute other members |
| 23 | DEAFEN_MEMBERS | Server-deafen other members |
| 24 | MOVE_MEMBERS | Move members between voice channels |
| 25 | USE_VOICE_ACTIVITY | Use voice activity detection |
| 26 | STREAM | Share screen in voice channels |
| 27 | DISCONNECT_MEMBERS | Disconnect members from voice channels |
| 25 | STREAM | Share screen in voice channels |
| 26 | DISCONNECT_MEMBERS | Disconnect members from voice channels |
**Resolution order:** Owner → @everyone role → Assigned roles (OR'd) → ADMINISTRATOR shortcut → Channel overrides (@everyone → role overrides → member override).