diff options
Diffstat (limited to 'web/react/stores/user_store.jsx')
-rw-r--r-- | web/react/stores/user_store.jsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx index 6b7d671fc..40b64b34b 100644 --- a/web/react/stores/user_store.jsx +++ b/web/react/stores/user_store.jsx @@ -164,6 +164,10 @@ class UserStoreClass extends EventEmitter { } getProfile(userId) { + if (userId === this.getCurrentId()) { + return this.getCurrentUser(); + } + return this.getProfiles()[userId]; } @@ -193,13 +197,13 @@ class UserStoreClass extends EventEmitter { return BrowserStore.getItem('profiles', {}); } - getActiveOnlyProfiles() { + getActiveOnlyProfiles(skipCurrent) { const active = {}; const profiles = this.getProfiles(); const currentId = this.getCurrentId(); for (var key in profiles) { - if (profiles[key].delete_at === 0 && profiles[key].id !== currentId) { + if (!(profiles[key].id === currentId && skipCurrent) && profiles[key].delete_at === 0) { active[key] = profiles[key]; } } |