(fix) sent messages cannot be replied to their BCC email addresses (fixes #4460)

This commit is contained in:
Ludovic Marcotte
2019-02-19 14:50:49 -05:00
parent dad0be1815
commit 98463f2ff2
3 changed files with 16 additions and 7 deletions

1
NEWS
View File

@@ -18,6 +18,7 @@ Bug fixes
- [web] reflect active locale in HTML lang attribute (#4660)
- [web] allow scroll of login page on small screen (#4035)
- [web] fixed saving of email address for external calendar notifications (#4630)
- [web] sent messages cannot be replied to their BCC email addresses (#4460)
- [core] ignore transparent events in time conflict validation (#4539)
- [core] fixed yearly recurrence calculator when starting from previous year
- [core] changes to contacts are now propagated to lists (#850, #4301, #4617)

View File

@@ -752,25 +752,33 @@ static NSString *userAgent = nil;
[_info removeObjectForKey: @"cc"];
}
/* CC processing if we reply-to-all: - we add all 'to' and 'cc' fields */
/* CC processing if we reply-to-all: - we add all 'to', 'cc' and 'bcc' fields */
if (_replyToAll)
{
to = [[NSMutableArray alloc] init];
to = [NSMutableArray array];
[addrs setArray: [_envelope to]];
[self _purgeRecipients: allRecipients
fromAddresses: addrs];
fromAddresses: addrs];
[self _addEMailsOfAddresses: addrs toArray: to];
[self _addRecipients: addrs toArray: allRecipients];
[addrs setArray: [_envelope cc]];
[self _purgeRecipients: allRecipients
fromAddresses: addrs];
fromAddresses: addrs];
[self _addEMailsOfAddresses: addrs toArray: to];
[self _addRecipients: addrs toArray: allRecipients];
[_info setObject: to forKey: @"cc"];
[to release];
if ([[_envelope bcc] count])
{
to = [NSMutableArray array];
[addrs setArray: [_envelope bcc]];
[self _purgeRecipients: allRecipients
fromAddresses: addrs];
[self _addEMailsOfAddresses: addrs toArray: to];
[_info setObject: to forKey: @"bcc"];
}
}
}

View File

@@ -275,7 +275,7 @@
*/
Message.prototype.allowReplyAll = function() {
var recipientsCount = 0;
recipientsCount = _.reduce(['to', 'cc'], _.bind(function(count, type) {
recipientsCount = _.reduce(['to', 'cc', 'bcc'], _.bind(function(count, type) {
if (this[type])
return count + this[type].length;
else