From 0cfcf5c5decc89a8a8070272f92da0c0ae49693d Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 6 May 2016 12:08:58 -0400 Subject: Add separator between DMs on your team and not (#2910) --- webapp/stores/user_store.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'webapp/stores/user_store.jsx') 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; -- cgit v1.2.3-1-g7c22