Fix up more call ids in the inspector
This commit is contained in:
parent
cbf533cd09
commit
5c6ea69f43
1 changed files with 13 additions and 6 deletions
|
@ -78,9 +78,12 @@ export function GroupCallInspector({ client, groupCall, show }) {
|
||||||
function onCallHangup(call) {
|
function onCallHangup(call) {
|
||||||
setState(({ hangupCalls, ...rest }) => ({
|
setState(({ hangupCalls, ...rest }) => ({
|
||||||
...rest,
|
...rest,
|
||||||
hangupCalls: hangupCalls
|
hangupCalls: {
|
||||||
? [...hangupCalls, getHangupCallState(call)]
|
...hangupCalls,
|
||||||
: [getHangupCallState(call)],
|
[`${call.callId} (${
|
||||||
|
call.getOpponentMember()?.userId || call.sender
|
||||||
|
})`]: getHangupCallState(call),
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +105,10 @@ export function GroupCallInspector({ client, groupCall, show }) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setToDeviceEvents((prev) => [...prev, { eventType, content }]);
|
setToDeviceEvents((prev) => [
|
||||||
|
...prev,
|
||||||
|
{ eventType, content, sender: event.getSender() },
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
client.on("RoomState.events", onUpdateRoomState);
|
client.on("RoomState.events", onUpdateRoomState);
|
||||||
|
@ -159,8 +165,9 @@ export function GroupCallInspector({ client, groupCall, show }) {
|
||||||
|
|
||||||
for (const event of toDeviceEvents) {
|
for (const event of toDeviceEvents) {
|
||||||
const callId = event.content.call_id;
|
const callId = event.content.call_id;
|
||||||
result[callId] = result[callId] || [];
|
const key = `${callId} (${event.sender})`;
|
||||||
result[callId].push(event);
|
result[key] = result[key] || [];
|
||||||
|
result[key].push(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue