Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Revert "feat(deep-linking): use same action for join in app if scheme url is undefined"

Calinteodor8006bd05c6ed
diff --git a/react/features/base/config/functions.web.ts b/react/features/base/config/functions.web.ts
index cb530a659f..86fb4a5f2c 100644
--- a/react/features/base/config/functions.web.ts
+++ b/react/features/base/config/functions.web.ts
@@ -74,12 +74,12 @@ export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
|| 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet-x86_64.AppImage';
ios.appName = ios.appName || 'Jitsi Meet';
- ios.appScheme = ios.appScheme ?? 'org.jitsi.meet';
+ ios.appScheme = ios.appScheme || 'org.jitsi.meet';
ios.downloadLink = ios.downloadLink
|| 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905';
android.appName = android.appName || 'Jitsi Meet';
- android.appScheme = android.appScheme ?? 'org.jitsi.meet';
+ android.appScheme = android.appScheme || 'org.jitsi.meet';
android.downloadLink = android.downloadLink
|| 'https://play.google.com/store/apps/details?id=org.jitsi.meet';
android.appPackage = android.appPackage || 'org.jitsi.meet';
diff --git a/react/features/deep-linking/components/DeepLinkingMobilePage.web.tsx b/react/features/deep-linking/components/DeepLinkingMobilePage.web.tsx
index bd6ef767db..12caf93339 100644
--- a/react/features/deep-linking/components/DeepLinkingMobilePage.web.tsx
+++ b/react/features/deep-linking/components/DeepLinkingMobilePage.web.tsx
@@ -95,13 +95,13 @@ const useStyles = makeStyles()((theme: Theme) => {
});
const DeepLinkingMobilePage: React.FC<WithTranslation> = ({ t }) => {
- const dispatch = useDispatch();
const deeplinkingCfg = useSelector((state: IReduxState) =>
state['features/base/config']?.deeplinking || {} as IDeeplinkingConfig);
const { hideLogo } = deeplinkingCfg;
- const deepLinkingUrl: string | undefined = useSelector(generateDeepLinkingURL);
+ const deepLinkingUrl: string = useSelector(generateDeepLinkingURL);
const room = useSelector((state: IReduxState) => decodeURIComponent(state['features/base/conference'].room || ''));
const url = useSelector((state: IReduxState) => state['features/base/connection'] || {});
+ const dispatch = useDispatch();
const { classes: styles } = useStyles();
const generateDownloadURL = useCallback(() => {
@@ -128,10 +128,7 @@ const DeepLinkingMobilePage: React.FC<WithTranslation> = ({ t }) => {
sendAnalytics(
createDeepLinkingPageEvent(
'clicked', 'openAppButton', { isMobileBrowser: true }));
- if (!deepLinkingUrl) {
- dispatch(openWebApp());
- }
- }, [ deepLinkingUrl ]);
+ }, []);
const onOpenLinkProperties = useMemo(() => {
const { downloadLink }
diff --git a/react/features/deep-linking/functions.web.ts b/react/features/deep-linking/functions.web.ts
index dc3df40b94..314677efaf 100644
--- a/react/features/deep-linking/functions.web.ts
+++ b/react/features/deep-linking/functions.web.ts
@@ -13,11 +13,17 @@ import { _openDesktopApp } from './openDesktopApp.web';
/**
* Generates a deep linking URL based on the current window URL.
*
- * @param {IReduxState} state - The current state of the app.
+ * @param {Object} state - Object containing current redux state.
*
- * @returns {string|undefined} - The generated URL, or undefined if no scheme is configured.
+ * @returns {string} - The generated URL.
*/
-export function generateDeepLinkingURL(state: IReduxState): string | undefined {
+export function generateDeepLinkingURL(state: IReduxState) {
+ // If the user installed the app while this Component was displayed
+ // (e.g. the user clicked the Download the App button), then we would
+ // like to open the current URL in the mobile app. The only way to do it
+ // appears to be a link with an app-specific scheme, not a Universal
+ // Link.
+
const { href } = window.location;
const regex = new RegExp(URI_PROTOCOL_PATTERN, 'gi');
@@ -26,10 +32,6 @@ export function generateDeepLinkingURL(state: IReduxState): string | undefined {
const { appScheme, appPackage } = mobileConfig;
- if (!appScheme) {
- return undefined;
- }
-
// Android: use an intent link, custom schemes don't work in all browsers.
// https://developer.chrome.com/multidevice/android/intents
if (Platform.OS === 'android') {