summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-05-04 06:31:42 -0700
committerChristopher Speller <crspeller@gmail.com>2016-05-04 09:31:42 -0400
commit6611229cd7bd3cdfc0082c0a581145aaac0ab322 (patch)
treedb6670a8c2716179bfe6e07b82588d83d3afb6bd /webapp/utils/utils.jsx
parent6b06f49e8910ed44f619adad15ab268758312852 (diff)
downloadchat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.tar.gz
chat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.tar.bz2
chat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.zip
PLT-2707 Adding option to show DM list from all of server (#2871)
* PLT-2707 Adding option to show DM list from all of server * Fixing loc
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r--webapp/utils/utils.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 8917c97e4..e34fa403f 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -1247,6 +1247,13 @@ export function openDirectChannelToUser(user, successCb, errorCb) {
'true'
);
+ // if the user in another team and isn't already in the direct message
+ // list then we should add him so his name shows up correctly.
+ var profileUser = UserStore.getProfile(user.id);
+ if (!profileUser) {
+ UserStore.getDirectProfiles()[user.id] = user;
+ }
+
const channelName = this.getDirectChannelName(UserStore.getCurrentId(), user.id);
let channel = ChannelStore.getByName(channelName);