diff --git a/zephyr/static/js/composebox_typeahead.js b/zephyr/static/js/composebox_typeahead.js index d97ba5c40c..91935f533f 100644 --- a/zephyr/static/js/composebox_typeahead.js +++ b/zephyr/static/js/composebox_typeahead.js @@ -282,7 +282,15 @@ exports.initialize = function () { } else { this.completing = 'mention'; this.token = current_token.substring(current_token.indexOf("@")+1); - return page_params.people_list; + var all_item = { + special_item_text: "all (Notify everyone)", + email: "all", + // Always sort above, under the assumption that names will + // be longer and only contain "all" as a substring. + pm_recipient_count: Infinity, + full_name: "all" + }; + return page_params.people_list.concat([all_item]); } }, items: 5, diff --git a/zephyr/static/js/typeahead_helper.js b/zephyr/static/js/typeahead_helper.js index 490c311668..3d92c4f1f7 100644 --- a/zephyr/static/js/typeahead_helper.js +++ b/zephyr/static/js/typeahead_helper.js @@ -75,6 +75,9 @@ exports.private_message_typeahead_list = []; exports.private_message_mapped = {}; exports.render_person = function (person) { + if (person.special_item_text){ + return person.special_item_text; + } return person.full_name + " <" + person.email + ">"; };