mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
Handle email changes in user_events.update_person().
This code isn't active yet, since the back end doesn't send events yet for email changes.
This commit is contained in:
parent
4c53ad59f2
commit
10e220f516
@ -16,6 +16,20 @@ exports.update_person = function update(person) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_.has(person, 'new_email')) {
|
||||
var user_id = person.user_id;
|
||||
var new_email = person.new_email;
|
||||
|
||||
narrow.update_email(user_id, new_email);
|
||||
compose.update_email(user_id, new_email);
|
||||
|
||||
if (people.is_my_user_id(person.user_id)) {
|
||||
settings.update_email(new_email);
|
||||
}
|
||||
|
||||
people.update_email(user_id, new_email);
|
||||
}
|
||||
|
||||
if (_.has(person, 'full_name')) {
|
||||
people.set_full_name(person_obj, person.full_name);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user