Remove window.Signal.Migrations

This commit is contained in:
Fedor Indutny
2025-10-10 13:37:38 -07:00
committed by GitHub
parent 17cb59b64c
commit 40c31e138b
62 changed files with 550 additions and 799 deletions

View File

@@ -2,14 +2,15 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { AttachmentType } from '../types/Attachment.js';
import { deleteDraftFile } from './migrations.js';
export async function deleteDraftAttachment(
attachment: Pick<AttachmentType, 'screenshotPath' | 'path'>
): Promise<void> {
if (attachment.screenshotPath) {
await window.Signal.Migrations.deleteDraftFile(attachment.screenshotPath);
await deleteDraftFile(attachment.screenshotPath);
}
if (attachment.path) {
await window.Signal.Migrations.deleteDraftFile(attachment.path);
await deleteDraftFile(attachment.path);
}
}