Don't add a person more than once to our people_list

The full name may have changed

(imported from commit 44cf37b3f5e17c28f0a6b0a4c75a5c22470a9516)
This commit is contained in:
Leo Franchi 2013-02-11 17:50:47 -05:00
parent b0bdd7fe0b
commit 6f18f4465d
1 changed files with 1 additions and 1 deletions

View File

@ -479,7 +479,7 @@ function add_message_metadata(message, dummy) {
$.each(involved_people, function (idx, person) {
// Do the hasOwnProperty() call via the prototype to avoid problems
// with keys like "hasOwnProperty"
if (! typeahead_helper.known_to_typeahead(person)) {
if (!typeahead_helper.known_to_typeahead(person) && people_dict[person.email] === undefined) {
add_person(person);
typeahead_helper.autocomplete_needs_update(true);
}