Fix up more call ids in the inspector
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user