mirror of https://github.com/zulip/zulip.git
Account for update_user not having a full_name field.
Going forward, the back end may supply fields other than full_name, like is_admin, so we should make sure the field is in the hash first. (imported from commit be94b9698bae0866444739e2846ff65a3ab27eb6)
This commit is contained in:
parent
93deefec8d
commit
81d975c5ff
|
@ -90,15 +90,17 @@ function update_person(person) {
|
|||
}
|
||||
var person_obj = people_dict.get(person.email);
|
||||
|
||||
if (people_by_name_dict.has(person_obj.full_name)) {
|
||||
people_by_name_dict.set(person.full_name, person_obj);
|
||||
people_by_name_dict.del(person_obj.full_name);
|
||||
}
|
||||
if (_.has(person, 'full_name')) {
|
||||
if (people_by_name_dict.has(person_obj.full_name)) {
|
||||
people_by_name_dict.set(person.full_name, person_obj);
|
||||
people_by_name_dict.del(person_obj.full_name);
|
||||
}
|
||||
|
||||
person_obj.full_name = person.full_name;
|
||||
person_obj.full_name = person.full_name;
|
||||
|
||||
if (person.email === page_params.email) {
|
||||
page_params.fullname = person.full_name;
|
||||
if (person.email === page_params.email) {
|
||||
page_params.fullname = person.full_name;
|
||||
}
|
||||
}
|
||||
|
||||
activity.set_user_statuses([]);
|
||||
|
|
Loading…
Reference in New Issue