refactor: unify DM calls with server voice architecture

Merge connectDm() into connect() with isDm flag, eliminating ~145 lines
of duplicated LiveKit room setup. DM calls now inherit all event handlers
(SpeakingDetector cleanup, deafen broadcasts, metadata changes). Replace
monolithic DmCallView with shared VoiceGrid + VoiceControlBar components,
making DM calls group-DM-ready with full feature parity.
This commit is contained in:
Jannis Braun
2026-02-23 20:52:58 +01:00
parent 5e34b39b78
commit bc51fc6f7e
6 changed files with 61 additions and 458 deletions
@@ -95,7 +95,6 @@ export function AppLayout() {
const activeDmCall = useVoiceStore((s) => s.activeDmCall);
const {
connect: connectVoice,
connectDm: connectDmVoice,
disconnect: disconnectVoice,
isConnected: isVoiceConnected,
isConnecting: isVoiceConnecting,
@@ -133,7 +132,7 @@ export function AppLayout() {
lastAttemptedRef.current = targetChannelId;
if (activeDmCall) {
await connectDmVoice(activeDmCall.dmChannelId);
await connectVoice(activeDmCall.dmChannelId, true);
} else {
await connectVoice(targetChannelId);
}
@@ -162,8 +161,7 @@ export function AppLayout() {
isWsConnected,
isLoading,
user,
connectVoice,
connectDmVoice,
connectVoice,
disconnectVoice
]);