diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-07-27 17:16:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 17:16:48 -0400 |
commit | 67e2715274dcc7869baa8b39f5c8d0baf8ea4bed (patch) | |
tree | 63208943379a1c1fc2532db002c78ca36ec77dfe /webapp/actions/global_actions.jsx | |
parent | e83ba9a4a720f8ec7d63cef6e6b53779ba41fb7b (diff) | |
download | chat-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/global_actions.jsx')
-rw-r--r-- | webapp/actions/global_actions.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx index b3dc078c4..2b65beffd 100644 --- a/webapp/actions/global_actions.jsx +++ b/webapp/actions/global_actions.jsx @@ -45,9 +45,11 @@ export function emitChannelClickEvent(channel) { const currentUserId = UserStore.getCurrentId(); const otherUserId = Utils.getUserIdFromChannelName(chan); createDirectChannel(currentUserId, otherUserId)(dispatch, getState).then( - (data) => { - if (data) { - success(data); + (result) => { + const receivedChannel = result.data; + + if (receivedChannel) { + success(receivedChannel); } else { fail(); } |