fix(mail): Fix images in attachements when replying to a mail. Fixes #5731

This commit is contained in:
smizrahi
2023-04-06 09:13:08 +02:00
parent 4fc61a28d5
commit dbd4e20c34

View File

@@ -872,7 +872,10 @@ static NSString *userAgent = nil;
{
currentInfo = [attachments objectAtIndex: count];
if (!onlyImages
|| (onlyImages && [[NGMimeBodyPart imageMimeTypes] containsObject: [currentInfo objectForKey: @"mimetype"]])) {
|| (onlyImages
&& [[NGMimeBodyPart imageMimeTypes] containsObject: [currentInfo objectForKey: @"mimetype"]]
&& [currentInfo objectForKey: @"bodyId"]
&& [[currentInfo objectForKey: @"bodyId"] length] > 0)) {
[self saveAttachment: [currentInfo objectForKey: @"body"]
withMetadata: currentInfo];
}