Remove all user we insert into autocomplete when alerting

(imported from commit 34521b5e9e312b5026f9dc015cc35de837d0e2a3)
This commit is contained in:
Leo Franchi 2013-09-18 15:40:57 -04:00
parent 4300d7441a
commit ce4a850bfc
1 changed files with 5 additions and 1 deletions

View File

@ -373,7 +373,11 @@ exports.initialize = function () {
beginning = (beginning.substring(0, beginning.length - this.token.length-1)
+ '@**' + item.full_name + '** ');
$(document).trigger('usermention_completed.zulip', {mentioned: item});
// We insert a special `all` item to the autocompleter above
// Don't consider it a user mention
if (item.email !== 'all') {
$(document).trigger('usermention_completed.zulip', {mentioned: item});
}
}
// Keep the cursor after the newly inserted text, as Bootstrap will call textbox.change() to overwrite the text