summaryrefslogtreecommitdiffstats
path: root/webapp/actions/user_actions.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-19 13:55:47 -0400
committerChristopher Speller <crspeller@gmail.com>2017-06-19 10:55:47 -0700
commitef9326bcbb461b4f3265f75a9f738e67e58b88d1 (patch)
tree1d2abc5304be4df51762985753ede12749f3bf43 /webapp/actions/user_actions.jsx
parent1594cf8af102d0ffe7c62fc68004049e918a530a (diff)
downloadchat-ef9326bcbb461b4f3265f75a9f738e67e58b88d1.tar.gz
chat-ef9326bcbb461b4f3265f75a9f738e67e58b88d1.tar.bz2
chat-ef9326bcbb461b4f3265f75a9f738e67e58b88d1.zip
Move integrations over to redux and v4 (#6679)
Diffstat (limited to 'webapp/actions/user_actions.jsx')
-rw-r--r--webapp/actions/user_actions.jsx20
1 files changed, 11 insertions, 9 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index 88325de3e..c94f6232d 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -12,8 +12,6 @@ import {loadStatusesForProfilesList, loadStatusesForProfilesMap} from 'actions/s
import {getDirectChannelName, getUserIdFromChannelName} from 'utils/utils.jsx';
-import Client from 'client/web_client.jsx';
-
import {Constants, ActionTypes, Preferences} from 'utils/constants.jsx';
import {browserHistory} from 'react-router/es6';
@@ -26,6 +24,7 @@ import * as Selectors from 'mattermost-redux/selectors/entities/users';
import {getBool} from 'mattermost-redux/selectors/entities/preferences';
import * as UserActions from 'mattermost-redux/actions/users';
+import {Client4} from 'mattermost-redux/client';
import {getClientConfig, getLicenseConfig} from 'mattermost-redux/actions/general';
import {getTeamMembersByIds, getMyTeamMembers, getMyTeamUnreads} from 'mattermost-redux/actions/teams';
@@ -739,32 +738,35 @@ export function webLoginByLdap(loginId, password, token, success, error) {
}
export function getAuthorizedApps(success, error) {
- Client.getAuthorizedApps(
+ Client4.getAuthorizedOAuthApps(getState().entities.users.currentUserId).then(
(authorizedApps) => {
if (success) {
success(authorizedApps);
}
- },
+ }
+ ).catch(
(err) => {
if (error) {
error(err);
}
- });
+ }
+ );
}
export function deauthorizeOAuthApp(appId, success, error) {
- Client.deauthorizeOAuthApp(
- appId,
+ Client4.deauthorizeOAuthApp(appId).then(
() => {
if (success) {
success();
}
- },
+ }
+ ).catch(
(err) => {
if (error) {
error(err);
}
- });
+ }
+ );
}
export function uploadProfileImage(userPicture, success, error) {