mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
typeahead: Prevent duplicate private message recipients.
This matches the recipients and displays the ones which haven't been added already. Fixes: #2499.
This commit is contained in:
@@ -436,6 +436,10 @@ exports.initialize = function () {
|
||||
if (! current_recipient.match(/\S/)) {
|
||||
return false;
|
||||
}
|
||||
var recipients = util.extract_pm_recipients(this.query);
|
||||
if (recipients.indexOf(item.email) > -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return query_matches_person(current_recipient, item);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user