mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 04:13:18 +01:00
Improve ref counting when deduplicating attachments on disk
This commit is contained in:
@@ -30,10 +30,12 @@ type AttachmentDataToBeReused = WithRequiredProperties<
|
||||
export async function getExistingAttachmentDataForReuse({
|
||||
plaintextHash,
|
||||
contentType,
|
||||
messageId,
|
||||
logId,
|
||||
}: {
|
||||
plaintextHash: string;
|
||||
contentType: MIMEType;
|
||||
messageId: string;
|
||||
logId?: string;
|
||||
}): Promise<AttachmentDataToBeReused | null> {
|
||||
const existingAttachmentData =
|
||||
@@ -41,6 +43,7 @@ export async function getExistingAttachmentDataForReuse({
|
||||
plaintextHash,
|
||||
version: CURRENT_ATTACHMENT_VERSION,
|
||||
contentType,
|
||||
messageId,
|
||||
});
|
||||
|
||||
if (!existingAttachmentData) {
|
||||
|
||||
Reference in New Issue
Block a user