Only preserve existing Message-ID when reediting a draft.
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 31 May 2017 19:10:19 +0000 (21:10 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 31 May 2017 19:10:19 +0000 (21:10 +0200)
This is a followup to commit e22cbed1f.
Closes Bug 3828 - "Re-edit" should not recycle the Message-ID header

src/compose.c

index 1a6557dc4700aa789b3a08668af0e75dbabdae4b..bd34f43d84533b7046ac3351ae383fb12b1ba601 100644 (file)
@@ -2981,7 +2981,9 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
                if (msginfo->inreplyto && *msginfo->inreplyto)
                        compose->inreplyto = g_strdup(msginfo->inreplyto);
 
-               if (msginfo->msgid && *msginfo->msgid)
+               if (msginfo->msgid && *msginfo->msgid &&
+                               compose->folder != NULL &&
+                               compose->folder->stype ==  F_DRAFT)
                        compose->msgid = g_strdup(msginfo->msgid);
        } else {
                if (msginfo->msgid && *msginfo->msgid)