feat: add federatedCallId and callOrigin to client call routing

Enable federated DM calls to route accept/reject/end through the correct
WebSocket connection using callOrigin, and include federatedCallId in all
dm_call payloads for server-side FederatedCallEntry lookup.
This commit is contained in:
Jannis Braun
2026-04-08 03:26:48 +02:00
parent 0c57f9491f
commit ba7b975bc8
10 changed files with 73 additions and 31 deletions
@@ -102,7 +102,9 @@ export function MainContent() {
const handleCancelCall = () => {
if (!currentChannelId) return;
useVoiceStore.getState().setOutgoingCall(null);
wsSend({ type: 'dm_call_end', dmChannelId: currentChannelId }, getChannelOrigin(currentChannelId));
const { federatedCallId, callOrigin } = useVoiceStore.getState();
const origin = callOrigin || getChannelOrigin(currentChannelId);
wsSend({ type: 'dm_call_end', dmChannelId: currentChannelId, federatedCallId }, origin);
};
if (isInDmCall) {