[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
This commit is contained in:
parent
0009e7fec5
commit
ff60cc1fbf
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue