Add additional logging for attachment downloading

This commit is contained in:
trevor-signal 2024-03-20 11:23:31 -04:00 committed by GitHub
parent 62e33b44ba
commit 83e8f4b59d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 1 deletions

View file

@ -100,8 +100,11 @@ export async function downloadAttachmentV2(
dropNull(cdnNumber),
options
);
log.info(`${logId} got download stream`);
const cipherTextRelativePath = await downloadToDisk({ downloadStream, size });
log.info(`${logId} downloaded encrypted file to disk`);
const cipherTextAbsolutePath =
window.Signal.Migrations.getAbsoluteAttachmentPath(cipherTextRelativePath);
@ -112,6 +115,7 @@ export async function downloadAttachmentV2(
size,
theirDigest: Bytes.fromBase64(digest),
});
log.info(`${logId} successfully decrypted`);
safeUnlinkSync(cipherTextAbsolutePath);