Fix media not auto-downloading

This commit is contained in:
Josh Perez 2022-03-30 16:53:30 -04:00 committed by GitHub
parent a8962c7d20
commit 16f0f4262a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2563,14 +2563,14 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
} }
const shouldHoldOffDownload = const shouldHoldOffDownload =
!queueStoryForDownload || (isStory(message.attributes) && !queueStoryForDownload) ||
((isImage(attachments) || isVideo(attachments)) && ((isImage(attachments) || isVideo(attachments)) &&
isInCall(reduxState)); isInCall(reduxState));
if ( if (
this.hasAttachmentDownloads() && this.hasAttachmentDownloads() &&
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
(this.getConversation()!.getAccepted() || (this.getConversation()!.getAccepted() ||
queueStoryForDownload ||
isOutgoing(message.attributes)) && isOutgoing(message.attributes)) &&
!shouldHoldOffDownload !shouldHoldOffDownload
) { ) {