Don't sync storage when discovering deleted links during restore

Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-09-17 20:16:12 -05:00 committed by GitHub
parent 7267cd894e
commit 60b73a42c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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<CallLinkRefreshJobData> {
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) {