From fd019eefbb7c2130d711718bda5efb3e3d4ce8aa Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Mon, 21 Nov 2016 16:48:27 -0500
Subject: Fixed error logged when joining a team from another tab (#4620)

---
 webapp/actions/websocket_actions.jsx | 5 +++++
 1 file changed, 5 insertions(+)

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

diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index b61d039af..60ed44fc9 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -211,6 +211,11 @@ function handleNewUserEvent(msg) {
         return;
     }
 
+    if (msg.data.user_id === UserStore.getCurrentId()) {
+        // We should already have ourselves
+        return;
+    }
+
     AsyncClient.getUser(msg.data.user_id);
     AsyncClient.getChannelStats();
     loadProfilesAndTeamMembersForDMSidebar();
-- 
cgit v1.2.3-1-g7c22

