Backups: use new locatorInfo & mediaName (#10627)

This commit is contained in:
trevor-signal
2025-06-18 13:16:29 -04:00
committed by GitHub
parent 099f94a809
commit fb0c414702
78 changed files with 2271 additions and 2842 deletions

View File

@@ -5,13 +5,13 @@ import { assert } from 'chai';
import { omit } from 'lodash';
import type { WritableDB } from '../../sql/Interface';
import { createDB, updateToVersion, explain } from './helpers';
import type { AttachmentDownloadJobType } from '../../types/AttachmentDownload';
import { jsonToObject, objectToJSON, sql } from '../../sql/util';
import { IMAGE_BMP } from '../../types/MIME';
import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media';
function insertOldJob(
db: WritableDB,
job: Omit<AttachmentDownloadJobType, 'source' | 'ciphertextSize'>,
job: Omit<_AttachmentDownloadJobTypeV1040, 'source' | 'ciphertextSize'>,
addMessageFirst: boolean = true
): void {
if (addMessageFirst) {
@@ -86,7 +86,10 @@ describe('SQL/updateToSchemaVersion1180', () => {
});
it('adds source column with default standard to any existing jobs', async () => {
const job: Omit<AttachmentDownloadJobType, 'source' | 'ciphertextSize'> = {
const job: Omit<
_AttachmentDownloadJobTypeV1040,
'source' | 'ciphertextSize'
> = {
messageId: '123',
digest: 'digest',
attachmentType: 'attachment',