From 7971c4ee1e43d58900c15ec9843422e61b2ed2db Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 11 Mar 2021 20:37:01 +0100 Subject: [PATCH] Set correlation ID on cross account move --- app/src/main/java/eu/faircode/email/Core.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 6097592776..ebdbd6114b 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -957,6 +957,7 @@ class Core { try (InputStream is = new BufferedInputStream(new FileInputStream(file))) { imessage = new MimeMessageEx(isession, is, message.msgid); } + imessage.addHeader(MessageHelper.HEADER_CORRELATION_ID, message.msgid); imessage.saveChanges(); } @@ -976,12 +977,11 @@ class Core { } // Handle auto read - if (flags.contains(Flags.Flag.SEEN)) { + if (flags.contains(Flags.Flag.SEEN)) if (autoread && !imessage.isSet(Flags.Flag.SEEN)) { Log.i(folder.name + " autoread"); imessage.setFlag(Flags.Flag.SEEN, true); } - } // Handle draft if (flags.contains(Flags.Flag.DRAFT))