mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Backups: use new locatorInfo & mediaName (#10627)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user