[REGRESSION] Invite Links (#2007)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Djorkaeff Alexandre 2020-04-09 02:27:00 -03:00 committed by GitHub
parent 00a21808ed
commit 1427e530bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 11 deletions

View File

@ -30,8 +30,9 @@ const handleInviteLink = function* handleInviteLink({ params, requireLogin = fal
const navigate = function* navigate({ params }) { const navigate = function* navigate({ params }) {
yield put(appStart('inside')); yield put(appStart('inside'));
if (params.path) { if (params.path) {
const room = yield RocketChat.canOpenRoom(params);
const [type, name] = params.path.split('/'); const [type, name] = params.path.split('/');
if (type !== 'invite') {
const room = yield RocketChat.canOpenRoom(params);
if (room) { if (room) {
yield Navigation.navigate('RoomsListView'); yield Navigation.navigate('RoomsListView');
Navigation.navigate('RoomView', { Navigation.navigate('RoomView', {
@ -44,6 +45,7 @@ const navigate = function* navigate({ params }) {
} else { } else {
yield handleInviteLink({ params }); yield handleInviteLink({ params });
} }
}
}; };
const handleOpen = function* handleOpen({ params }) { const handleOpen = function* handleOpen({ params }) {