diff --git a/model/user.go b/model/user.go index f857d5ef4b..b0c30619ce 100644 --- a/model/user.go +++ b/model/user.go @@ -235,7 +235,6 @@ func (u *User) Sanitize(options map[string]bool) { } func (u *User) ClearNonProfileFields() { - u.UpdateAt = 0 u.Password = "" u.AuthData = new(string) *u.AuthData = "" diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx index 2abc6ebd41..1c4ef9c161 100644 --- a/webapp/actions/websocket_actions.jsx +++ b/webapp/actions/websocket_actions.jsx @@ -248,6 +248,9 @@ function handleUserRemovedEvent(msg) { function handleUserUpdatedEvent(msg) { if (UserStore.getCurrentId() !== msg.user_id) { UserStore.saveProfile(msg.data.user); + if (UserStore.hasDirectProfile(msg.user_id)) { + UserStore.saveDirectProfile(msg.data.user); + } UserStore.emitChange(msg.user_id); } } diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx index ca4284d293..6a47d0f654 100644 --- a/webapp/stores/user_store.jsx +++ b/webapp/stores/user_store.jsx @@ -166,6 +166,10 @@ class UserStoreClass extends EventEmitter { return this.direct_profiles; } + saveDirectProfile(profile) { + this.direct_profiles[profile.id] = profile; + } + saveDirectProfiles(profiles) { this.direct_profiles = profiles; }