summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-11-15 08:06:58 -0500
committerChristopher Speller <crspeller@gmail.com>2016-11-15 08:06:58 -0500
commite4f46124b0aa0d661bf59f229c0ebc3c7dc65d1d (patch)
tree1cc25ee31b1de89653d72df0412967959963861f /webapp/actions
parent7df8eaf29aa59467236c1b434bc09ccc33cd011f (diff)
parent3f19ccf1b1a6efdcc990cf8a0270ec4ffc0c6e22 (diff)
downloadchat-e4f46124b0aa0d661bf59f229c0ebc3c7dc65d1d.tar.gz
chat-e4f46124b0aa0d661bf59f229c0ebc3c7dc65d1d.tar.bz2
chat-e4f46124b0aa0d661bf59f229c0ebc3c7dc65d1d.zip
Merge branch 'release-3.5'
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/global_actions.jsx24
1 files changed, 13 insertions, 11 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index f7c4c455c..a70462295 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -50,13 +50,13 @@ export function emitChannelClickEvent(channel) {
AsyncClient.updateLastViewedAt(chan.id);
loadPosts(chan.id);
trackPage();
+ });
- AppDispatcher.handleViewAction({
- type: ActionTypes.CLICK_CHANNEL,
- name: chan.name,
- id: chan.id,
- prev: ChannelStore.getCurrentId()
- });
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.CLICK_CHANNEL,
+ name: chan.name,
+ id: chan.id,
+ prev: ChannelStore.getCurrentId()
});
}
@@ -461,21 +461,23 @@ export function emitRemoteUserTypingEvent(channelId, userId, postParentId) {
});
}
-export function emitUserLoggedOutEvent(redirectTo) {
- const rURL = (redirectTo && typeof redirectTo === 'string') ? redirectTo : '/';
+export function emitUserLoggedOutEvent(redirectTo = '/', shouldSignalLogout = true) {
Client.logout(
() => {
- BrowserStore.signalLogout();
+ if (shouldSignalLogout) {
+ BrowserStore.signalLogout();
+ }
+
BrowserStore.clear();
ErrorStore.clearLastError();
PreferenceStore.clear();
UserStore.clear();
TeamStore.clear();
newLocalizationSelected(global.window.mm_config.DefaultClientLocale);
- browserHistory.push(rURL);
+ browserHistory.push(redirectTo);
},
() => {
- browserHistory.push(rURL);
+ browserHistory.push(redirectTo);
}
);
}