From 1d435368ba9d95b9ca4a4cda021558c8e31728e5 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 13 Oct 2022 20:55:28 +0200 Subject: [PATCH] S/MIME: decode protected header --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 8e4a3e396e..4a079dc26b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -8974,6 +8974,7 @@ public class FragmentMessages extends FragmentBase MimeMessage imessage = new MimeMessage(isession, is); MessageHelper helper = new MessageHelper(imessage, context); MessageHelper.MessageParts parts = helper.getMessageParts(); + String protect_subject = parts.getProtectedSubject(); // Write decrypted body SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); @@ -8999,6 +9000,9 @@ public class FragmentMessages extends FragmentBase try { db.beginTransaction(); + if (protect_subject != null) + db.message().setMessageSubject(message.id, protect_subject); + db.message().setMessageContent(message.id, true, message.language,