From cbf533cd090ed1f8007e58e1a6996da0b1c5bd5b Mon Sep 17 00:00:00 2001 From: Robert Long Date: Mon, 1 Nov 2021 13:10:17 -0700 Subject: [PATCH] Make call / call stats ids easier to read --- src/GroupCallInspector.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/GroupCallInspector.jsx b/src/GroupCallInspector.jsx index 5a7433e0..5010470c 100644 --- a/src/GroupCallInspector.jsx +++ b/src/GroupCallInspector.jsx @@ -65,7 +65,12 @@ export function GroupCallInspector({ client, groupCall, show }) { } function onCallsChanged() { - const calls = groupCall.calls.map(getCallState); + const calls = groupCall.calls.reduce((obj, call) => { + obj[ + `${call.callId} (${call.getOpponentMember()?.userId || call.sender})` + ] = getCallState(call); + return obj; + }, {}); updateState({ calls }); } @@ -109,7 +114,10 @@ export function GroupCallInspector({ client, groupCall, show }) { let timeout; async function updateCallStats() { - const callIds = groupCall.calls.map((call) => call.callId); + const callIds = groupCall.calls.map( + (call) => + `${call.callId} (${call.getOpponentMember()?.userId || call.sender})` + ); const stats = await Promise.all( groupCall.calls.map((call) => call.peerConn