composebox_typeahead: Refactor @mentions logic to not block #streams.

This commit is contained in:
Tim Abbott 2016-11-01 20:14:54 -07:00
parent fe2aab7571
commit 6c96f3f2c7
1 changed files with 28 additions and 28 deletions

View File

@ -220,10 +220,7 @@ exports.compose_content_begins_typeahead = function (query) {
return emoji.emojis;
}
if (!this.options.completions.mention) {
return false;
}
if (this.options.completions.mention && current_token[0] === '@') {
if (!autocomplete_checks(q, '@')) {
return false;
}
@ -250,6 +247,9 @@ exports.compose_content_begins_typeahead = function (query) {
};
var persons = people.get_all_persons();
return [].concat(persons, [all_item, everyone_item]);
}
return false;
};
exports.content_highlighter = function (item) {