Update call history timestamps from group call update messages
This commit is contained in:
parent
72d1695612
commit
66a4a8690a
2 changed files with 191 additions and 118 deletions
|
@ -186,7 +186,10 @@ import {
|
|||
getCallsHistoryForRedux,
|
||||
loadCallsHistory,
|
||||
} from './services/callHistoryLoader';
|
||||
import { getCallIdFromEra } from './util/callDisposition';
|
||||
import {
|
||||
getCallIdFromEra,
|
||||
updateLocalGroupCallHistoryTimestamp,
|
||||
} from './util/callDisposition';
|
||||
|
||||
export function isOverHourIntoPast(timestamp: number): boolean {
|
||||
return isNumber(timestamp) && isOlderThan(timestamp, HOUR);
|
||||
|
@ -2908,16 +2911,29 @@ export async function startApp(): Promise<void> {
|
|||
): boolean {
|
||||
if (message.groupCallUpdate) {
|
||||
if (message.groupV2 && messageDescriptor.type === Message.GROUP) {
|
||||
const conversationId = messageDescriptor.id;
|
||||
const callId =
|
||||
message.groupCallUpdate?.eraId != null
|
||||
? getCallIdFromEra(message.groupCallUpdate.eraId)
|
||||
: null;
|
||||
log.info(
|
||||
'handleGroupCallUpdateMessage',
|
||||
message.timestamp,
|
||||
message.groupCallUpdate?.eraId != null
|
||||
? getCallIdFromEra(message.groupCallUpdate.eraId)
|
||||
: null
|
||||
callId,
|
||||
conversationId
|
||||
);
|
||||
window.reduxActions.calling.peekNotConnectedGroupCall({
|
||||
conversationId: messageDescriptor.id,
|
||||
conversationId,
|
||||
});
|
||||
if (callId != null) {
|
||||
drop(
|
||||
updateLocalGroupCallHistoryTimestamp(
|
||||
conversationId,
|
||||
callId,
|
||||
message.timestamp
|
||||
)
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
log.warn(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue