From 67e2715274dcc7869baa8b39f5c8d0baf8ea4bed Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 27 Jul 2017 17:16:48 -0400 Subject: 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 --- webapp/actions/global_actions.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'webapp/actions/global_actions.jsx') 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(); } -- cgit v1.2.3-1-g7c22