diff --git a/NEWS b/NEWS index 92fa0974b..588fa3373 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Bug fixes - [web] date validator now handles non-latin characters + - [web] show the "reply all" button in more situations 4.0.6 (2019-02-21) ------------------ diff --git a/UI/WebServerResources/js/Mailer/Message.service.js b/UI/WebServerResources/js/Mailer/Message.service.js index 62b71d7d9..94d6bfe90 100644 --- a/UI/WebServerResources/js/Mailer/Message.service.js +++ b/UI/WebServerResources/js/Mailer/Message.service.js @@ -274,12 +274,22 @@ * @returns true if the message is not a draft and has more than one recipient */ Message.prototype.allowReplyAll = function() { + var identities = _.map(this.$mailbox.$account.identities, 'email'); var recipientsCount = 0; - recipientsCount = _.reduce(['to', 'cc', 'bcc'], _.bind(function(count, type) { - if (this[type]) - return count + this[type].length; - else + recipientsCount = _.reduce(['to', 'cc', 'bcc', 'reply-to'], _.bind(function(count, type) { + var typeCount = 0; + if (this[type]) { + typeCount = this[type].length; + _.forEach(this[type], function(recipient) { + if (_.indexOf(identities, recipient.email) >= 0) { + typeCount--; + } + }); + return count + typeCount; + } + else { return count; + } }, this), recipientsCount); return !this.isDraft && recipientsCount > 1;