Deduplicate incoming attachments on disk

This commit is contained in:
trevor-signal
2026-02-05 14:48:31 -05:00
committed by GitHub
parent 85cc412b40
commit 834f0c7775
51 changed files with 1727 additions and 560 deletions

View File

@@ -10,7 +10,7 @@ import { DurationInSeconds } from '../util/durations/index.std.js';
import {
getAbsoluteAttachmentPath,
writeNewAttachmentData,
deleteAttachmentData,
maybeDeleteAttachmentFile,
} from '../util/migrations.preload.js';
import type { ContactAvatarType } from '../types/Avatar.std.js';
import type { AttachmentType } from '../types/Attachment.std.js';
@@ -173,7 +173,7 @@ export class ParseContactsTransform extends Transform {
this.contacts.push(prepared);
} else {
// eslint-disable-next-line no-await-in-loop
await deleteAttachmentData(local.path);
await maybeDeleteAttachmentFile(local.path);
}
this.activeContact = undefined;