From ff60cc1fbf0614b72751d8a5bc2d4884c4aff9fe Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 13 May 2020 15:57:54 -0300 Subject: [PATCH] [IMPROVEMENT] Enable navigating to a room from auth deep linking (#2115) * Wait for login success to navigate * Enable auth and room deep linking at the same time --- app/sagas/deepLinking.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/sagas/deepLinking.js b/app/sagas/deepLinking.js index 5d23173f..d5a2b87c 100644 --- a/app/sagas/deepLinking.js +++ b/app/sagas/deepLinking.js @@ -75,7 +75,7 @@ const handleOpen = function* handleOpen({ params }) { if (!connected) { yield localAuthenticate(host); yield put(selectServerRequest(host)); - yield take(types.SERVER.SELECT_SUCCESS); + yield take(types.LOGIN.SUCCESS); } yield navigate({ params }); } else { @@ -106,6 +106,8 @@ const handleOpen = function* handleOpen({ params }) { if (params.token) { yield take(types.SERVER.SELECT_SUCCESS); yield RocketChat.connect({ server: host, user: { token: params.token } }); + yield take(types.LOGIN.SUCCESS); + yield navigate({ params }); } else { yield handleInviteLink({ params, requireLogin: true }); }