mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-27 20:03:25 +01:00
Remove window.Signal.Migrations
This commit is contained in:
@@ -7,6 +7,11 @@ import { createLogger } from '../logging/log.js';
|
||||
import { SignalService as Proto } from '../protobuf/index.js';
|
||||
import protobuf from '../protobuf/wrap.js';
|
||||
import { DurationInSeconds } from '../util/durations/index.js';
|
||||
import {
|
||||
getAbsoluteAttachmentPath,
|
||||
writeNewAttachmentData,
|
||||
deleteAttachmentData,
|
||||
} from '../util/migrations.js';
|
||||
import type { ContactAvatarType } from '../types/Avatar.js';
|
||||
import type { AttachmentType } from '../types/Attachment.js';
|
||||
import type { AciString } from '../types/ServiceId.js';
|
||||
@@ -61,9 +66,7 @@ export async function parseContactsV2(
|
||||
{
|
||||
idForLogging: 'parseContactsV2',
|
||||
|
||||
ciphertextPath: window.Signal.Migrations.getAbsoluteAttachmentPath(
|
||||
attachment.path
|
||||
),
|
||||
ciphertextPath: getAbsoluteAttachmentPath(attachment.path),
|
||||
keysBase64: attachment.localKey,
|
||||
size: attachment.size,
|
||||
type: 'local',
|
||||
@@ -155,7 +158,7 @@ export class ParseContactsTransform extends Transform {
|
||||
|
||||
const local =
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await window.Signal.Migrations.writeNewAttachmentData(avatarData);
|
||||
await writeNewAttachmentData(avatarData);
|
||||
|
||||
const contentType = this.activeContact.avatar?.contentType;
|
||||
const prepared = prepareContact(this.activeContact, {
|
||||
@@ -170,7 +173,7 @@ export class ParseContactsTransform extends Transform {
|
||||
this.contacts.push(prepared);
|
||||
} else {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await window.Signal.Migrations.deleteAttachmentData(local.path);
|
||||
await deleteAttachmentData(local.path);
|
||||
}
|
||||
this.activeContact = undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user