1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-26 10:52:17 -05:00

[WO-371] CC myself if I chose to CC myself

This commit is contained in:
Tankred Hase 2014-05-07 20:19:20 +02:00
parent 5cb79330d0
commit 4da56b6fe7

View File

@ -2,6 +2,7 @@ define(function(require) {
'use strict';
var angular = require('angular'),
_ = require('underscore'),
appController = require('js/app-controller'),
aes = require('cryptoLib/aes-cbc'),
util = require('cryptoLib/util'),
@ -79,15 +80,21 @@ define(function(require) {
}
if (replyAll) {
re.to.concat(re.cc).forEach(function(recipient) {
if (recipient.address === emailDao._account.emailAddress) {
var me = emailDao._account.emailAddress;
if (recipient.address === me && re.from[0].address !== me) {
// don't reply to yourself
return;
}
$scope.cc.unshift({
address: recipient.address
});
$scope.showCC = true;
});
// filter duplicates
$scope.cc = _.uniq($scope.cc, function(recipient) {
return recipient.address;
});
$scope.showCC = true;
$scope.cc.forEach($scope.verify);
}