summaryrefslogtreecommitdiffstats
path: root/webapp/actions/channel_actions.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-07-27 17:16:48 -0400
committerGitHub <noreply@github.com>2017-07-27 17:16:48 -0400
commit67e2715274dcc7869baa8b39f5c8d0baf8ea4bed (patch)
tree63208943379a1c1fc2532db002c78ca36ec77dfe /webapp/actions/channel_actions.jsx
parente83ba9a4a720f8ec7d63cef6e6b53779ba41fb7b (diff)
downloadchat-67e2715274dcc7869baa8b39f5c8d0baf8ea4bed.tar.gz
chat-67e2715274dcc7869baa8b39f5c8d0baf8ea4bed.tar.bz2
chat-67e2715274dcc7869baa8b39f5c8d0baf8ea4bed.zip
RN-152 Updated createGroupChannel's return value to match createDirectChannel (#7027)
* RN-152 Updated createGroupChannel's return value to match createDirectChannel * Fixed handling of results from createDirectChannel * Updated yarn.lock
Diffstat (limited to 'webapp/actions/channel_actions.jsx')
-rw-r--r--webapp/actions/channel_actions.jsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx
index 6e529d332..39dc37591 100644
--- a/webapp/actions/channel_actions.jsx
+++ b/webapp/actions/channel_actions.jsx
@@ -181,14 +181,13 @@ export function openDirectChannelToUser(userId, success, error) {
export function openGroupChannelToUsers(userIds, success, error) {
ChannelActions.createGroupChannel(userIds)(dispatch, getState).then(
- (data) => {
+ (result) => {
loadProfilesForSidebar();
- if (data && success) {
- success(data, false);
- } else if (data == null && error) {
+ if (result.data && success) {
+ success(result.data, false);
+ } else if (result.error && error) {
browserHistory.push(TeamStore.getCurrentTeamUrl());
- const serverError = getState().requests.channels.createChannel.error;
- error({id: serverError.server_error_id, ...serverError});
+ error({id: result.error.server_error_id, ...result.error});
}
}
);