diff options
Diffstat (limited to 'webapp/actions/channel_actions.jsx')
-rw-r--r-- | webapp/actions/channel_actions.jsx | 11 |
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}); } } ); |