Update attachment download handling while in a call

This commit is contained in:
trevor-signal 2024-04-19 13:09:51 -04:00 committed by GitHub
parent a51962e9b9
commit d0d49a043f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 26 deletions

View file

@ -11,13 +11,14 @@ import { getAttachmentSignature, isDownloaded } from '../types/Attachment';
export async function addAttachmentToMessage(
message: MessageModel | null | undefined,
attachment: AttachmentType,
jobLogId: string,
{ type }: { type: AttachmentDownloadJobTypeType }
): Promise<void> {
if (!message) {
return;
}
const logPrefix = `${message.idForLogging()} (type: ${type})`;
const logPrefix = `${jobLogId}/addAttachmentToMessage`;
const attachmentSignature = getAttachmentSignature(attachment);
if (type === 'long-message') {