Add logs to group call peeks after call ended
This commit is contained in:
parent
1f7386d7cf
commit
dc9caa0a99
2 changed files with 31 additions and 6 deletions
|
@ -190,6 +190,7 @@ import {
|
|||
getCallsHistoryForRedux,
|
||||
loadCallsHistory,
|
||||
} from './services/callHistoryLoader';
|
||||
import { getCallIdFromEra } from './util/callDisposition';
|
||||
|
||||
export function isOverHourIntoPast(timestamp: number): boolean {
|
||||
return isNumber(timestamp) && isOlderThan(timestamp, HOUR);
|
||||
|
@ -2913,6 +2914,13 @@ export async function startApp(): Promise<void> {
|
|||
): boolean {
|
||||
if (message.groupCallUpdate) {
|
||||
if (message.groupV2 && messageDescriptor.type === Message.GROUP) {
|
||||
log.info(
|
||||
'handleGroupCallUpdateMessage',
|
||||
message.timestamp,
|
||||
message.groupCallUpdate?.eraId != null
|
||||
? getCallIdFromEra(message.groupCallUpdate.eraId)
|
||||
: null
|
||||
);
|
||||
window.reduxActions.calling.peekNotConnectedGroupCall({
|
||||
conversationId: messageDescriptor.id,
|
||||
});
|
||||
|
|
|
@ -345,9 +345,13 @@ const doGroupCallPeek = (
|
|||
conversationId
|
||||
);
|
||||
if (
|
||||
existingCall?.callMode === CallMode.Group &&
|
||||
existingCall != null &&
|
||||
existingCall.callMode === CallMode.Group &&
|
||||
existingCall.connectionState !== GroupCallConnectionState.NotConnected
|
||||
) {
|
||||
log.info(
|
||||
`doGroupCallPeek/groupv2: Not peeking because the connection state is ${existingCall.connectionState}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -375,11 +379,18 @@ const doGroupCallPeek = (
|
|||
const joinState =
|
||||
existingCall?.callMode === CallMode.Group ? existingCall.joinState : null;
|
||||
|
||||
await calling.updateCallHistoryForGroupCall(
|
||||
conversationId,
|
||||
joinState,
|
||||
peekInfo
|
||||
);
|
||||
try {
|
||||
await calling.updateCallHistoryForGroupCall(
|
||||
conversationId,
|
||||
joinState,
|
||||
peekInfo
|
||||
);
|
||||
} catch (error) {
|
||||
log.error(
|
||||
'doGroupCallPeek/groupv2: Failed to update call history',
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
|
||||
const formattedPeekInfo = calling.formatGroupCallPeekInfoForRedux(peekInfo);
|
||||
|
||||
|
@ -874,6 +885,12 @@ function groupCallStateChange(
|
|||
const { ourAci } = getState().user;
|
||||
strictAssert(ourAci, 'groupCallStateChange failed to fetch our ACI');
|
||||
|
||||
log.info(
|
||||
'groupCallStateChange:',
|
||||
payload.conversationId,
|
||||
GroupCallConnectionState[payload.connectionState],
|
||||
GroupCallJoinState[payload.joinState]
|
||||
);
|
||||
dispatch({
|
||||
type: GROUP_CALL_STATE_CHANGE,
|
||||
payload: {
|
||||
|
|
Loading…
Reference in a new issue