From 10936fef6496aaa3c10be3f450d6046368d8794f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 29 Dec 2013 05:57:39 -0500 Subject: [PATCH] Don't alter Message-ID of a draft when sending (#1489409) --- program/js/app.js | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index e6cc281..44afd5c 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3607,16 +3607,18 @@ { var rc; - if (!this.env.draft_id && id && (rc = this.opener())) { - // refresh the drafts folder in opener window - if (rc.env.task == 'mail' && rc.env.action == '' && rc.env.mailbox == this.env.drafts_mailbox) - rc.command('checkmail'); + if (id && id != this.env.draft_id) { + if (rc = this.opener()) { + // refresh the drafts folder in opener window + if (rc.env.task == 'mail' && rc.env.action == '' && rc.env.mailbox == this.env.drafts_mailbox) + rc.command('checkmail'); + } + + this.env.draft_id = id; + $("input[name='_draft_saveid']").val(id); + + this.remove_compose_data(this.env.compose_id); } - - this.env.draft_id = id; - $("input[name='_draft_saveid']").val(id); - - this.remove_compose_data(this.env.compose_id); }; this.auto_save_start = function() -- Gitblit v1.9.1