diff --git a/app/actions/deepLinking.ts b/app/actions/deepLinking.ts index 78ea929bb..5b946daf7 100644 --- a/app/actions/deepLinking.ts +++ b/app/actions/deepLinking.ts @@ -7,7 +7,6 @@ interface IParams { rid: string; messageId: string; host: string; - isCall: boolean; fullURL: string; type: string; token: string; diff --git a/app/index.tsx b/app/index.tsx index 0f02cc04f..58eced6f5 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -65,15 +65,6 @@ const parseDeepLinking = (url: string) => { return parseQuery(url); } } - const call = /^(https:\/\/)?jitsi.rocket.chat\//; - const fullURL = url; - - if (url.match(call)) { - url = url.replace(call, '').trim(); - if (url) { - return { path: url, isCall: true, fullURL }; - } - } } return null; }; diff --git a/app/lib/methods/canOpenRoom.ts b/app/lib/methods/canOpenRoom.ts index 6cd389909..3222e91e3 100644 --- a/app/lib/methods/canOpenRoom.ts +++ b/app/lib/methods/canOpenRoom.ts @@ -1,5 +1,4 @@ import { ERoomTypes } from '../../definitions'; -import { store } from '../store/auxStore'; import database from '../database'; import sdk from '../services/sdk'; import { Services } from '../services'; @@ -63,18 +62,11 @@ async function open({ type, rid, name }: { type: ERoomTypes; rid: string; name: } } -export async function canOpenRoom({ rid, path, isCall }: { rid: string; isCall: boolean; path: string }): Promise { +export async function canOpenRoom({ rid, path }: { rid: string; path: string }): Promise { try { const db = database.active; const subsCollection = db.get('subscriptions'); - if (isCall && !rid) { - // Extract rid from a Jitsi URL - // Eg.: [Jitsi_URL_Room_Prefix][uniqueID][rid][?jwt] - const { Jitsi_URL_Room_Prefix, uniqueID } = store.getState().settings; - rid = path.replace(`${Jitsi_URL_Room_Prefix}${uniqueID}`, '').replace(/\?(.*)/g, ''); - } - if (rid) { try { const room = await subsCollection.find(rid); diff --git a/app/lib/methods/getSettings.ts b/app/lib/methods/getSettings.ts index c3c9cd9bb..a0db49385 100644 --- a/app/lib/methods/getSettings.ts +++ b/app/lib/methods/getSettings.ts @@ -160,7 +160,8 @@ export async function getSettings(): Promise { /* eslint-disable no-await-in-loop */ const response = await fetch( `${sdk.current.client.host}/api/v1/settings.public?query={"_id":{"$in":${JSON.stringify(settingsParams)}}} - &offset=${offset}`); + &offset=${offset}` + ); const result = await response.json(); @@ -172,7 +173,7 @@ export async function getSettings(): Promise { settings = [...settings, ...result.settings]; remaining = result.total - settings.length; /* eslint-enable no-await-in-loop */ - } while(remaining > 0); + } while (remaining > 0); const data: IData[] = settings; const filteredSettings: IPreparedSettings[] = _prepareSettings(data); diff --git a/app/lib/notifications/index.ts b/app/lib/notifications/index.ts index 167add557..8a0899576 100644 --- a/app/lib/notifications/index.ts +++ b/app/lib/notifications/index.ts @@ -12,7 +12,6 @@ interface IEjson { sender: { username: string; name: string }; type: string; host: string; - messageType: string; messageId: string; } @@ -20,7 +19,7 @@ export const onNotification = (push: INotification): void => { if (push.payload) { try { const notification = push.payload; - const { rid, name, sender, type, host, messageType, messageId }: IEjson = EJSON.parse(notification.ejson); + const { rid, name, sender, type, host, messageId }: IEjson = EJSON.parse(notification.ejson); const types: Record = { c: 'channel', @@ -37,8 +36,7 @@ export const onNotification = (push: INotification): void => { host, rid, messageId, - path: `${types[type]}/${roomName}`, - isCall: messageType === 'jitsi_call_started' + path: `${types[type]}/${roomName}` }; store.dispatch(deepLinkingOpen(params)); } catch (e) { diff --git a/app/sagas/deepLinking.js b/app/sagas/deepLinking.js index 4be3cf8e7..b746ea294 100644 --- a/app/sagas/deepLinking.js +++ b/app/sagas/deepLinking.js @@ -14,7 +14,7 @@ import { loginRequest } from '../actions/login'; import log from '../lib/methods/helpers/log'; import { RootEnum } from '../definitions'; import { CURRENT_SERVER, TOKEN_KEY } from '../lib/constants'; -import { callJitsi, callJitsiWithoutServer, canOpenRoom, getServerInfo } from '../lib/methods'; +import { canOpenRoom, getServerInfo } from '../lib/methods'; import { Services } from '../lib/services'; const roomTypes = { @@ -59,9 +59,6 @@ const navigate = function* navigate({ params }) { const jumpToMessageId = params.messageId; yield goRoom({ item, isMasterDetail, jumpToMessageId, jumpToThreadId, popToRoot: true }); - if (params.isCall) { - callJitsi(item); - } } } else { yield handleInviteLink({ params }); @@ -91,20 +88,6 @@ const handleOpen = function* handleOpen({ params }) { const serversCollection = serversDB.get('servers'); let { host } = params; - if (params.isCall && !host) { - const servers = yield serversCollection.query().fetch(); - // search from which server is that call - servers.forEach(({ uniqueID, id }) => { - if (params.path.includes(uniqueID)) { - host = id; - } - }); - - if (!host && params.fullURL) { - callJitsiWithoutServer(params.fullURL); - return; - } - } if (params.type === 'oauth') { yield handleOAuth({ params }); diff --git a/app/views/ShareListView/index.tsx b/app/views/ShareListView/index.tsx index b0dbd1675..aeebf06cf 100644 --- a/app/views/ShareListView/index.tsx +++ b/app/views/ShareListView/index.tsx @@ -436,7 +436,9 @@ class ShareListView extends React.Component { contentContainerStyle={[styles.container, styles.centered, { backgroundColor: themes[theme].backgroundColor }]} > {I18n.t('Read_External_Permission')} - {I18n.t('Read_External_Permission_Message')} + + {I18n.t('Read_External_Permission_Message')} + ); diff --git a/ios/RocketChatRN/RocketChatRN.entitlements b/ios/RocketChatRN/RocketChatRN.entitlements index e3d548026..3c6b134ac 100644 --- a/ios/RocketChatRN/RocketChatRN.entitlements +++ b/ios/RocketChatRN/RocketChatRN.entitlements @@ -11,7 +11,6 @@ com.apple.developer.associated-domains applinks:go.rocket.chat - applinks:jitsi.rocket.chat com.apple.security.application-groups