From db3c40fad1ec8bb4fda23494ddb77d7104ee34d8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 12 Oct 2012 18:41:04 -0400 Subject: [PATCH] Don't display yourself on list of huddle recipients. (imported from commit 17919c153ad380adbb0a9dc2c111ea1686603414) --- zephyr/static/js/zephyr.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 470fa218f8..ac9589089f 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -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; }