Retain key for downloaded attachments

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-03-18 13:53:43 -05:00 committed by GitHub
parent 4059a11893
commit 45164c0071
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { createWriteStream } from 'fs';
import { isNumber, omit } from 'lodash';
import { isNumber } from 'lodash';
import type { Readable } from 'stream';
import { Transform } from 'stream';
import { pipeline } from 'stream/promises';
@ -116,7 +116,7 @@ export async function downloadAttachmentV2(
safeUnlinkSync(cipherTextAbsolutePath);
return {
...omit(attachment, 'key'),
...attachment,
path,
size,
contentType: contentType