From 60b73a42c2a7fdb77d73d90a35ad0d476f7b4a0e Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 17 Sep 2024 20:16:12 -0500 Subject: [PATCH] Don't sync storage when discovering deleted links during restore Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> --- ts/jobs/callLinkRefreshJobQueue.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/jobs/callLinkRefreshJobQueue.ts b/ts/jobs/callLinkRefreshJobQueue.ts index 326c8fdc876a..9272b2c70822 100644 --- a/ts/jobs/callLinkRefreshJobQueue.ts +++ b/ts/jobs/callLinkRefreshJobQueue.ts @@ -13,7 +13,6 @@ import { jobQueueDatabaseStore } from './JobQueueDatabaseStore'; import { DAY, SECOND } from '../util/durations'; import { commonShouldJobContinue } from './helpers/commonShouldJobContinue'; import { DataReader, DataWriter } from '../sql/Client'; -import { storageServiceUploadJob } from '../services/storage'; import type { CallLinkType } from '../types/CallLink'; import { calling } from '../services/calling'; import { sleeper } from '../util/sleeper'; @@ -94,10 +93,11 @@ export class CallLinkRefreshJobQueue extends JobQueue { log.info( `${logId}: Call link not found on server, deleting local call link` ); + // This will leave a storage service record, and it's up to primary to delete it await DataWriter.beginDeleteCallLink(roomId, { - storageNeedsSync: true, + storageNeedsSync: false, }); - storageServiceUploadJob(); + await DataWriter.finalizeDeleteCallLink(roomId); window.reduxActions.calling.handleCallLinkDelete({ roomId }); } } catch (err) {