Move receipts and view/read syncs to new syncTasks system
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
949104c316
commit
b95dd1a70f
33 changed files with 1242 additions and 612 deletions
|
@ -347,6 +347,7 @@ const dataInterface: ServerInterface = {
|
|||
getLastConversationMessage,
|
||||
getAllCallHistory,
|
||||
clearCallHistory,
|
||||
markCallHistoryDeleted,
|
||||
cleanupCallHistoryMessages,
|
||||
getCallHistoryUnreadCount,
|
||||
markCallHistoryRead,
|
||||
|
@ -3635,6 +3636,19 @@ async function clearCallHistory(
|
|||
})();
|
||||
}
|
||||
|
||||
async function markCallHistoryDeleted(callId: string): Promise<void> {
|
||||
const db = await getWritableInstance();
|
||||
const [query, params] = sql`
|
||||
UPDATE callsHistory
|
||||
SET
|
||||
status = ${DirectCallStatus.Deleted},
|
||||
timestamp = ${Date.now()}
|
||||
WHERE callId = ${callId};
|
||||
`;
|
||||
|
||||
db.prepare(query).run(params);
|
||||
}
|
||||
|
||||
async function cleanupCallHistoryMessages(): Promise<void> {
|
||||
const db = await getWritableInstance();
|
||||
return db
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue