Use correct timestamps for failed call events
This commit is contained in:
parent
5b18bb8563
commit
e0d613f1b6
1 changed files with 12 additions and 5 deletions
|
@ -1291,7 +1291,8 @@ export class CallingClass {
|
||||||
|
|
||||||
this.addCallHistoryForFailedIncomingCall(
|
this.addCallHistoryForFailedIncomingCall(
|
||||||
conversation,
|
conversation,
|
||||||
callingMessage.offer.type === OfferType.VideoCall
|
callingMessage.offer.type === OfferType.VideoCall,
|
||||||
|
envelope.timestamp
|
||||||
);
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -1465,7 +1466,8 @@ export class CallingClass {
|
||||||
);
|
);
|
||||||
this.addCallHistoryForFailedIncomingCall(
|
this.addCallHistoryForFailedIncomingCall(
|
||||||
conversation,
|
conversation,
|
||||||
call.isVideoCall
|
call.isVideoCall,
|
||||||
|
Date.now()
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1482,7 +1484,11 @@ export class CallingClass {
|
||||||
return await this.getCallSettings(conversation);
|
return await this.getCallSettings(conversation);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
window.log.error(`Ignoring incoming call: ${err.stack}`);
|
window.log.error(`Ignoring incoming call: ${err.stack}`);
|
||||||
this.addCallHistoryForFailedIncomingCall(conversation, call.isVideoCall);
|
this.addCallHistoryForFailedIncomingCall(
|
||||||
|
conversation,
|
||||||
|
call.isVideoCall,
|
||||||
|
Date.now()
|
||||||
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1697,7 +1703,8 @@ export class CallingClass {
|
||||||
|
|
||||||
private addCallHistoryForFailedIncomingCall(
|
private addCallHistoryForFailedIncomingCall(
|
||||||
conversation: ConversationModel,
|
conversation: ConversationModel,
|
||||||
wasVideoCall: boolean
|
wasVideoCall: boolean,
|
||||||
|
timestamp: number
|
||||||
) {
|
) {
|
||||||
conversation.addCallHistory({
|
conversation.addCallHistory({
|
||||||
callMode: CallMode.Direct,
|
callMode: CallMode.Direct,
|
||||||
|
@ -1706,7 +1713,7 @@ export class CallingClass {
|
||||||
// Since the user didn't decline, make sure it shows up as a missed call instead
|
// Since the user didn't decline, make sure it shows up as a missed call instead
|
||||||
wasDeclined: false,
|
wasDeclined: false,
|
||||||
acceptedTime: undefined,
|
acceptedTime: undefined,
|
||||||
endedTime: Date.now(),
|
endedTime: timestamp,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue