feat: drag-and-drop voice channel moves with federation fix

Add drag-and-drop support for moving users between voice channels
(MOVE_MEMBERS permission required). Fix voice_moved handler using
wrong user ID for federated users — now uses the same isHome/
getMyUserIdForOrigin pattern as adjacent voice handlers.
This commit is contained in:
Jannis Braun
2026-03-11 23:44:20 +01:00
parent 825e9975c8
commit 68a4c453de
3 changed files with 73 additions and 4 deletions
+1 -1
View File
@@ -366,7 +366,7 @@ function handleEvent(origin: string, event: ServerEvent): void {
case 'voice_moved': {
// The local user was moved to a different channel by a moderator
const myMovedId = useAuthStore.getState().user?.id;
const myMovedId = isHome ? useAuthStore.getState().user?.id : getMyUserIdForOrigin(origin);
if (event.userId === myMovedId) {
// Import dynamically to avoid circular deps — joinVoiceChannel handles
// leaving old channel, setting new channel, and triggering LiveKit reconnect