Fix call history read syncs

This commit is contained in:
Jamie Kyle 2024-08-27 06:20:23 -07:00 committed by GitHub
parent 688de5a99b
commit 5a5b681b51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 187 additions and 46 deletions

View file

@ -1324,12 +1324,17 @@ export async function markAllCallHistoryReadAndSync(
log.info(
`markAllCallHistoryReadAndSync: Marking call history read before (${latestCall.callId}, ${latestCall.timestamp})`
);
let count: number;
if (inConversation) {
await DataWriter.markAllCallHistoryReadInConversation(latestCall);
count = await DataWriter.markAllCallHistoryReadInConversation(latestCall);
} else {
await DataWriter.markAllCallHistoryRead(latestCall);
count = await DataWriter.markAllCallHistoryRead(latestCall);
}
log.info(
`markAllCallHistoryReadAndSync: Marked ${count} call history messages read`
);
const ourAci = window.textsecure.storage.user.getCheckedAci();
const callLogEvent = new Proto.SyncMessage.CallLogEvent({