File Fix-Attachments-are-included-as-plain-text-in-replied-mails.patch of Package messagelib.6886
From bf247fc9e802a39b60c8828019401569f6ad99fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20Knau=C3=9F?= <sknauss@kde.org>
Date: Wed, 26 Oct 2016 16:59:37 +0200
Subject: Fix: Attachments are included as plain text in replied mails
Thanks to Simon Levitt to point to the corrent part that needs to be
fixed.
BUG: 368060
FIXED-IN: 5.3.4
---
 mimetreeparser/src/bodyformatter/utils.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mimetreeparser/src/bodyformatter/utils.cpp b/mimetreeparser/src/bodyformatter/utils.cpp
index a860b4b..e2396a5 100644
--- a/mimetreeparser/src/bodyformatter/utils.cpp
+++ b/mimetreeparser/src/bodyformatter/utils.cpp
@@ -56,7 +56,8 @@ MessagePart::Ptr MimeTreeParser::toplevelTextNode(MessagePart::Ptr messageTree)
         const auto m = mp.dynamicCast<MessagePart>();
         const auto text = mp.dynamicCast<TextMessagePart>();
         const auto alternative = mp.dynamicCast<AlternativeMessagePart>();
-        if (text) {
+        const auto attach = mp.dynamicCast<AttachmentMessagePart>();
+        if (text && !attach) {
             return text;
         } else if (alternative) {
             return alternative;
-- 
cgit v0.11.2