summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-05-06 12:08:58 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-05-06 12:08:58 -0400
commit0cfcf5c5decc89a8a8070272f92da0c0ae49693d (patch)
treeba2018c98116b80c33b3c33fcdece64e908bea72 /webapp/stores
parentd2f9fd52fe8b0da6f23775f242660329fcef6421 (diff)
downloadchat-0cfcf5c5decc89a8a8070272f92da0c0ae49693d.tar.gz
chat-0cfcf5c5decc89a8a8070272f92da0c0ae49693d.tar.bz2
chat-0cfcf5c5decc89a8a8070272f92da0c0ae49693d.zip
Add separator between DMs on your team and not (#2910)
Diffstat (limited to 'webapp/stores')
-rw-r--r--webapp/stores/user_store.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx
index 2d792fa17..8ae1e1404 100644
--- a/webapp/stores/user_store.jsx
+++ b/webapp/stores/user_store.jsx
@@ -114,6 +114,14 @@ class UserStoreClass extends EventEmitter {
return this.getProfile(userId) != null;
}
+ hasTeamProfile(userId) {
+ return this.getProfiles()[userId];
+ }
+
+ hasDirectProfile(userId) {
+ return this.getDirectProfiles()[userId];
+ }
+
getProfile(userId) {
if (userId === this.getCurrentId()) {
return this.getCurrentUser();
@@ -194,7 +202,7 @@ class UserStoreClass extends EventEmitter {
const currentUser = this.profiles[currentId];
if (currentUser) {
if (currentId in this.profiles) {
- delete this.profiles[currentId];
+ Reflect.deleteProperty(this.profiles, currentId);
}
this.profiles = profiles;