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