From 67c4fa2cf74f0180a8317ebb695907ec6f385194 Mon Sep 17 00:00:00 2001 From: Robert Schroll Date: Tue, 6 Aug 2013 12:36:27 -0700 Subject: [PATCH] Text parts shown as attachments: Closes #7300 --- src/engine/rfc822/rfc822-message.vala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/rfc822/rfc822-message.vala b/src/engine/rfc822/rfc822-message.vala index 39f63f89..35f98a92 100644 --- a/src/engine/rfc822/rfc822-message.vala +++ b/src/engine/rfc822/rfc822-message.vala @@ -686,6 +686,16 @@ public class Geary.RFC822.Message : BaseObject { return; } + GMime.ContentType content_type = part.get_content_type(); + if (part_disposition == Geary.Attachment.Disposition.INLINE && + content_type.get_media_type().down() == "text") { + string subtype = content_type.get_media_subtype().down(); + if (subtype == "html" || subtype == "plain") { + // These are part of the body. + return; + } + } + if (requested_disposition == null) { // Return any attachment whose disposition is recognized by Geary.Attachment.Disposition attachments.add(part);