Don't sync storage when discovering deleted links during restore

This commit is contained in:
ayumi-signal 2024-09-17 14:05:22 -07:00 committed by GitHub
parent ad1a5cbcb0
commit e5d03edea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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