mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
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:
@@ -90,15 +90,17 @@ function update_person(person) {
|
|||||||
}
|
}
|
||||||
var person_obj = people_dict.get(person.email);
|
var person_obj = people_dict.get(person.email);
|
||||||
|
|
||||||
if (people_by_name_dict.has(person_obj.full_name)) {
|
if (_.has(person, 'full_name')) {
|
||||||
people_by_name_dict.set(person.full_name, person_obj);
|
if (people_by_name_dict.has(person_obj.full_name)) {
|
||||||
people_by_name_dict.del(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) {
|
if (person.email === page_params.email) {
|
||||||
page_params.fullname = person.full_name;
|
page_params.fullname = person.full_name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
activity.set_user_statuses([]);
|
activity.set_user_statuses([]);
|
||||||
|
|||||||
Reference in New Issue
Block a user