From 7e4c890d502ca3bc7027f2e722c054b8e6e10b76 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 22 Apr 2020 17:53:13 -0300 Subject: [PATCH] Deep linking --- app/sagas/deepLinking.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/sagas/deepLinking.js b/app/sagas/deepLinking.js index 86aa2df69..5d23173fd 100644 --- a/app/sagas/deepLinking.js +++ b/app/sagas/deepLinking.js @@ -11,6 +11,7 @@ import database from '../lib/database'; import RocketChat from '../lib/rocketchat'; import EventEmitter from '../utils/events'; import { appStart } from '../actions'; +import { localAuthenticate } from '../utils/localAuthentication'; const roomTypes = { channel: 'c', direct: 'd', group: 'p', channels: 'l' @@ -72,6 +73,7 @@ const handleOpen = function* handleOpen({ params }) { if (server === host && user) { const connected = yield select(state => state.server.connected); if (!connected) { + yield localAuthenticate(host); yield put(selectServerRequest(host)); yield take(types.SERVER.SELECT_SUCCESS); } @@ -83,6 +85,7 @@ const handleOpen = function* handleOpen({ params }) { try { const servers = yield serversCollection.find(host); if (servers && user) { + yield localAuthenticate(host); yield put(selectServerRequest(host)); yield take(types.LOGIN.SUCCESS); yield navigate({ params });