diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-04 15:45:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 15:45:19 -0400 |
commit | 49481caf6db89b0853626ac52ab5f786a6887179 (patch) | |
tree | 128991892f16d7830097c217db689410a002eb73 /webapp/utils/async_client.jsx | |
parent | 44a8f76d993cdd97785cab7fd55ad9f07c3c757a (diff) | |
download | chat-49481caf6db89b0853626ac52ab5f786a6887179.tar.gz chat-49481caf6db89b0853626ac52ab5f786a6887179.tar.bz2 chat-49481caf6db89b0853626ac52ab5f786a6887179.zip |
PLT-6262 Add config setting to disable file attachments (#6301)
* Add config setting to disable file attachments
* Add unit tests
* Updating UI for no attachments (#6312)
* Update UI text on file upload System Console setting (#6313)
* Update storage_settings.jsx
* Update en.json
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r-- | webapp/utils/async_client.jsx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 712d447e8..deb967e3a 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -1,7 +1,6 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import BrowserStore from 'stores/browser_store.jsx'; import UserStore from 'stores/user_store.jsx'; import TeamStore from 'stores/team_store.jsx'; @@ -21,6 +20,12 @@ const callTracker = {}; const ASYNC_CLIENT_TIMEOUT = 5000; +// Redux actions +import store from 'stores/redux_store.jsx'; +const dispatch = store.dispatch; +const getState = store.getState; +import {setServerVersion} from 'mattermost-redux/actions/general'; + export function dispatchError(err, method) { AppDispatcher.handleServerAction({ type: ActionTypes.RECEIVED_ERROR, @@ -47,17 +52,7 @@ function isCallInProgress(callName) { } export function checkVersion() { - var serverVersion = Client.getServerVersion(); - - if (serverVersion !== BrowserStore.getLastServerVersion()) { - if (!BrowserStore.getLastServerVersion() || BrowserStore.getLastServerVersion() === '') { - BrowserStore.setLastServerVersion(serverVersion); - } else { - BrowserStore.setLastServerVersion(serverVersion); - window.location.reload(true); - console.log('Detected version update refreshing the page'); //eslint-disable-line no-console - } - } + setServerVersion(Client.getServerVersion())(dispatch, getState); } export function getUser(userId, success, error) { |