diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-20 00:17:00 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-20 00:17:00 +0100 |
commit | 44e3e7c5312e232c35403b5f8ad7cae0b4e6ddee (patch) | |
tree | a4902d07e465617a53a56f00aff66f4977964f9e /common/mailpreprocessor.cpp | |
parent | e6820f5b59a3d9615863740bb16cec150206e326 (diff) | |
download | sink-44e3e7c5312e232c35403b5f8ad7cae0b4e6ddee.tar.gz sink-44e3e7c5312e232c35403b5f8ad7cae0b4e6ddee.zip |
Fix threading for non-threaded messages.
Ensure we always have a messageId to work with,
and avoid grouping all non-threaded messages together.
Diffstat (limited to 'common/mailpreprocessor.cpp')
-rw-r--r-- | common/mailpreprocessor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/mailpreprocessor.cpp b/common/mailpreprocessor.cpp index bde8a64..1366718 100644 --- a/common/mailpreprocessor.cpp +++ b/common/mailpreprocessor.cpp | |||
@@ -127,6 +127,13 @@ static void updatedIndexedProperties(Sink::ApplicationDomain::Mail &mail, KMime: | |||
127 | parentMessageId = inReplyTo.first(); | 127 | parentMessageId = inReplyTo.first(); |
128 | } | 128 | } |
129 | } | 129 | } |
130 | if (messageId.isEmpty()) { | ||
131 | auto tmp = KMime::Message::Ptr::create(); | ||
132 | auto header = tmp->messageID(true); | ||
133 | header->generate("kube.kde.org"); | ||
134 | messageId = header->as7BitString(); | ||
135 | SinkWarning() << "Message id is empty, generating one: " << messageId; | ||
136 | } | ||
130 | 137 | ||
131 | mail.setExtractedMessageId(messageId); | 138 | mail.setExtractedMessageId(messageId); |
132 | if (!parentMessageId.isEmpty()) { | 139 | if (!parentMessageId.isEmpty()) { |