Skip to content

Commit

Permalink
fix(mail): Fix images in attachements when replying to a mail. Fixes …
Browse files Browse the repository at this point in the history
…#5731
  • Loading branch information
WoodySlum committed Apr 6, 2023
1 parent 4fc61a2 commit dbd4e20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SoObjects/Mailer/SOGoDraftObject.m
Expand Up @@ -872,7 +872,10 @@ - (void) _fetchAttachmentsFromMail: (SOGoMailObject *) sourceMail onlyImages: (B
{
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];
}
Expand Down

0 comments on commit dbd4e20

Please sign in to comment.