mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 04:13:18 +01:00
Remove window.Signal.Migrations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user