Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
show you when mail is sent to an alias or email
Browse files Browse the repository at this point in the history
  • Loading branch information
tahaalibra committed Jul 27, 2016
1 parent 8afc1a0 commit bdd5a5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion js/views/composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ define(function(require) {
alias = _.find(this.aliases, function(alias) { return alias.emailAddress === toEmail; });
}
if (alias) {
console.log(alias);
$('.mail-account').val(alias.id);
}
},
Expand Down
4 changes: 3 additions & 1 deletion js/views/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ define(function(require) {
.replace(/(^'|'$)/g, '');
label = Handlebars.Utils.escapeExpression(label);
var email = Handlebars.Utils.escapeExpression(value.email);
if (currentAccount && email === currentAccount.get('emailAddress')) {

if (currentAccount && (email === currentAccount.get('emailAddress') ||
_.find(currentAccount.get('aliases').toJSON(), function(alias) { return alias.alias === email; }))) {
label = t('mail', 'you');
}
var title = t('mail', 'Send message to {email}', {email: email});
Expand Down

0 comments on commit bdd5a5c

Please sign in to comment.