From 1427e530bff6594f67af291c91919cda88d25f32 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 9 Apr 2020 02:27:00 -0300 Subject: [PATCH] [REGRESSION] Invite Links (#2007) Co-authored-by: Diego Mello --- app/sagas/deepLinking.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/sagas/deepLinking.js b/app/sagas/deepLinking.js index a5427ea4f..86aa2df69 100644 --- a/app/sagas/deepLinking.js +++ b/app/sagas/deepLinking.js @@ -30,19 +30,21 @@ const handleInviteLink = function* handleInviteLink({ params, requireLogin = fal const navigate = function* navigate({ params }) { yield put(appStart('inside')); if (params.path) { - const room = yield RocketChat.canOpenRoom(params); const [type, name] = params.path.split('/'); - if (room) { - yield Navigation.navigate('RoomsListView'); - Navigation.navigate('RoomView', { - name, - t: roomTypes[type], - roomUserId: RocketChat.getUidDirectMessage(room), - ...room - }); + if (type !== 'invite') { + const room = yield RocketChat.canOpenRoom(params); + if (room) { + yield Navigation.navigate('RoomsListView'); + Navigation.navigate('RoomView', { + name, + t: roomTypes[type], + roomUserId: RocketChat.getUidDirectMessage(room), + ...room + }); + } + } else { + yield handleInviteLink({ params }); } - } else { - yield handleInviteLink({ params }); } };