Merge pull request #258 from jacadcaps/processFetchResponse

Process Message-ID and In-Reply-To in ENVELOPE.
This commit is contained in:
Vincent Richard 2021-03-31 21:22:13 +02:00 committed by GitHub
commit 8024c650a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,8 @@
#include "vmime/net/imap/IMAPMessagePart.hpp"
#include "vmime/net/imap/IMAPMessagePartContentHandler.hpp"
#include "vmime/messageId.hpp"
#include "vmime/messageIdSequence.hpp"
#include "vmime/utility/outputStreamAdapter.hpp"
#include <sstream>
@ -578,6 +580,19 @@ int IMAPMessage::processFetchResponse(
if (!bcc.isEmpty()) {
hdr->Bcc()->setValue(bcc.toAddressList());
}
// Message-ID
if (!env->env_message_id->isNIL) {
hdr->MessageId()->setValue(messageId(env->env_message_id->value));
}
// In-Reply-To
if (!env->env_in_reply_to->isNIL) {
shared_ptr <messageId> mid = make_shared <messageId>(env->env_in_reply_to->value);
messageIdSequence sequence;
sequence.appendMessageId(mid);
hdr->InReplyTo()->setValue(sequence);
}
}
break;