summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-06-15 08:00:55 -0400
committerGitHub <noreply@github.com>2016-06-15 08:00:55 -0400
commit1cfb35fd32478917ddf8becb7e438280db19d66a (patch)
treeb5f0e3157201767f2fd7df87be73617034f35a42 /webapp
parentf6b4a611d0ef28d5f08959a51c31ad480df1883a (diff)
downloadchat-1cfb35fd32478917ddf8becb7e438280db19d66a.tar.gz
chat-1cfb35fd32478917ddf8becb7e438280db19d66a.tar.bz2
chat-1cfb35fd32478917ddf8becb7e438280db19d66a.zip
Fix channels showing up across teams when multiple teams open in same browser (#3329)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/actions/websocket_actions.jsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index ffeb27fb2..7c8a014ba 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -245,7 +245,9 @@ function handleUserRemovedEvent(msg) {
function handleChannelViewedEvent(msg) {
// Useful for when multiple devices have the app open to different channels
- if (ChannelStore.getCurrentId() !== msg.channel_id && UserStore.getCurrentId() === msg.user_id) {
+ if (TeamStore.getCurrentId() === msg.team_id &&
+ ChannelStore.getCurrentId() !== msg.channel_id &&
+ UserStore.getCurrentId() === msg.user_id) {
AsyncClient.getChannel(msg.channel_id);
}
}