summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-11-14 13:48:28 -0500
committerGitHub <noreply@github.com>2016-11-14 13:48:28 -0500
commit814d2fc88d000c61b4430fa00cbadeb9674091c5 (patch)
tree23106db8d6a60e68e318be926d36dfedeb362de1 /webapp/components
parentdb0314053e0ac32a29e628a1389975d046a22edb (diff)
downloadchat-814d2fc88d000c61b4430fa00cbadeb9674091c5.tar.gz
chat-814d2fc88d000c61b4430fa00cbadeb9674091c5.tar.bz2
chat-814d2fc88d000c61b4430fa00cbadeb9674091c5.zip
Fixed websocket to properly logout when logged out from another tab (#4546)
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/logged_in.jsx4
1 files changed, 1 insertions, 3 deletions
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index 4e7df0392..ec4ca2a6a 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -14,8 +14,6 @@ import {loadEmoji} from 'actions/emoji_actions.jsx';
import * as Utils from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
-import {browserHistory} from 'react-router/es6';
-
const BACKSPACE_CHAR = 8;
import $ from 'jquery';
@@ -41,7 +39,7 @@ export default class LoggedIn extends React.Component {
}
console.log('detected logout from a different tab'); //eslint-disable-line no-console
- browserHistory.push('/');
+ GlobalActions.emitUserLoggedOutEvent('/', false);
}
if (e.originalEvent.key === '__login__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) {