summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--model/user.go1
-rw-r--r--webapp/actions/websocket_actions.jsx3
-rw-r--r--webapp/stores/user_store.jsx4
3 files changed, 7 insertions, 1 deletions
diff --git a/model/user.go b/model/user.go
index f857d5ef4..b0c30619c 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 2abc6ebd4..1c4ef9c16 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 ca4284d29..6a47d0f65 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;
}