Don't display yourself on list of huddle recipients.

(imported from commit 17919c153ad380adbb0a9dc2c111ea1686603414)
This commit is contained in:
Tim Abbott 2012-10-12 18:41:04 -04:00
parent ec1533b0b1
commit db3c40fad1
1 changed files with 7 additions and 3 deletions

View File

@ -110,10 +110,14 @@ function get_huddle_recipient(message) {
function get_huddle_recipient_names(message) {
var recipient, i;
var other_recipients = $.grep(message.display_recipient,
function (element, index) {
return element.email !== email;
});
recipient = message.display_recipient[0].full_name;
for (i = 1; i < message.display_recipient.length; i++) {
recipient += ', ' + message.display_recipient[i].full_name;
recipient = other_recipients[0].full_name;
for (i = 1; i < other_recipients.length; i++) {
recipient += ', ' + other_recipients[i].full_name;
}
return recipient;
}