Deduplicate incoming attachments on disk

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-02-09 11:37:27 -06:00
committed by GitHub
parent 23b0da737d
commit ed381109f5
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;