From 0cfcf5c5decc89a8a8070272f92da0c0ae49693d Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Fri, 6 May 2016 12:08:58 -0400
Subject: Add separator between DMs on your team and not (#2910)

---
 webapp/action_creators/websocket_actions.jsx | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'webapp/action_creators/websocket_actions.jsx')

diff --git a/webapp/action_creators/websocket_actions.jsx b/webapp/action_creators/websocket_actions.jsx
index 0d4c76201..b208b4d33 100644
--- a/webapp/action_creators/websocket_actions.jsx
+++ b/webapp/action_creators/websocket_actions.jsx
@@ -141,6 +141,10 @@ function handleMessage(msg) {
         handleChannelDeletedEvent(msg);
         break;
 
+    case SocketEvents.DIRECT_ADDED:
+        handleDirectAddedEvent(msg);
+        break;
+
     case SocketEvents.PREFERENCE_CHANGED:
         handlePreferenceChangedEvent(msg);
         break;
@@ -201,9 +205,15 @@ function handlePostDeleteEvent(msg) {
 
 function handleNewUserEvent() {
     AsyncClient.getProfiles();
+    AsyncClient.getDirectProfiles();
     AsyncClient.getChannelExtraInfo();
 }
 
+function handleDirectAddedEvent(msg) {
+    AsyncClient.getChannel(msg.channel_id);
+    AsyncClient.getDirectProfiles();
+}
+
 function handleUserAddedEvent(msg) {
     if (ChannelStore.getCurrentId() === msg.channel_id) {
         AsyncClient.getChannelExtraInfo();
-- 
cgit v1.2.3-1-g7c22

