mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Fix up more call ids in the inspector
This commit is contained in:
parent
cbf533cd09
commit
5c6ea69f43
@ -78,9 +78,12 @@ export function GroupCallInspector({ client, groupCall, show }) {
|
||||
function onCallHangup(call) {
|
||||
setState(({ hangupCalls, ...rest }) => ({
|
||||
...rest,
|
||||
hangupCalls: hangupCalls
|
||||
? [...hangupCalls, getHangupCallState(call)]
|
||||
: [getHangupCallState(call)],
|
||||
hangupCalls: {
|
||||
...hangupCalls,
|
||||
[`${call.callId} (${
|
||||
call.getOpponentMember()?.userId || call.sender
|
||||
})`]: getHangupCallState(call),
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
@ -102,7 +105,10 @@ export function GroupCallInspector({ client, groupCall, show }) {
|
||||
return;
|
||||
}
|
||||
|
||||
setToDeviceEvents((prev) => [...prev, { eventType, content }]);
|
||||
setToDeviceEvents((prev) => [
|
||||
...prev,
|
||||
{ eventType, content, sender: event.getSender() },
|
||||
]);
|
||||
}
|
||||
|
||||
client.on("RoomState.events", onUpdateRoomState);
|
||||
@ -159,8 +165,9 @@ export function GroupCallInspector({ client, groupCall, show }) {
|
||||
|
||||
for (const event of toDeviceEvents) {
|
||||
const callId = event.content.call_id;
|
||||
result[callId] = result[callId] || [];
|
||||
result[callId].push(event);
|
||||
const key = `${callId} (${event.sender})`;
|
||||
result[key] = result[key] || [];
|
||||
result[key].push(event);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user