Skip to content

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

fix(deeplinking): Prevent web specific files beeing included in native build.

Hristo Terezov7e57156d2a23
diff --git a/react/features/app/functions.native.ts b/react/features/app/functions.native.ts
index 513f48852e..8743fa202a 100644
--- a/react/features/app/functions.native.ts
+++ b/react/features/app/functions.native.ts
@@ -5,7 +5,6 @@ import { toState } from '../base/redux/functions';
import { getServerURL } from '../base/settings/functions.native';
export * from './functions.any';
-import logger from './logger';
/**
* Retrieves the default URL for the app. This can either come from a prop to
@@ -39,18 +38,3 @@ export function getName() {
export function getSdkBundlePath() {
return NativeModules.AppInfo.sdkBundlePath;
}
-
-/**
- * This is a dummy implementation for compatibility with web. It executes the passed handler right away.
- *
- * @param {Function} handler - The callback function to execute.
- * @returns {void}
- */
-export function executeAfterLoad(handler: () => void) {
- try {
- handler();
- } catch (error) {
- logger.error('Error executing handler after load:', error);
- }
-}
-
diff --git a/react/features/app/middlewares.any.ts b/react/features/app/middlewares.any.ts
index 34ce7c0c70..b7a70f5e80 100644
--- a/react/features/app/middlewares.any.ts
+++ b/react/features/app/middlewares.any.ts
@@ -24,7 +24,6 @@ import '../calendar-sync/middleware';
import '../chat/middleware';
import '../conference/middleware';
import '../connection-indicator/middleware';
-import '../deep-linking/middleware';
import '../device-selection/middleware';
import '../display-name/middleware';
import '../dynamic-branding/middleware';
diff --git a/react/features/app/middlewares.web.ts b/react/features/app/middlewares.web.ts
index 391aafaab3..7e47425fe4 100644
--- a/react/features/app/middlewares.web.ts
+++ b/react/features/app/middlewares.web.ts
@@ -2,6 +2,7 @@ import '../base/app/middleware';
import '../base/connection/middleware';
import '../base/devices/middleware';
import '../base/media/middleware';
+import '../deep-linking/middleware.web';
import '../dynamic-branding/middleware';
import '../e2ee/middleware';
import '../external-api/middleware';
diff --git a/react/features/deep-linking/functions.ts b/react/features/deep-linking/functions.web.ts
similarity index 98%
rename from react/features/deep-linking/functions.ts
rename to react/features/deep-linking/functions.web.ts
index e413275b75..314677efaf 100644
--- a/react/features/deep-linking/functions.ts
+++ b/react/features/deep-linking/functions.web.ts
@@ -8,7 +8,7 @@ import { isVpaasMeeting } from '../jaas/functions';
import DeepLinkingDesktopPage from './components/DeepLinkingDesktopPage';
import DeepLinkingMobilePage from './components/DeepLinkingMobilePage';
import NoMobileApp from './components/NoMobileApp';
-import { _openDesktopApp } from './openDesktopApp';
+import { _openDesktopApp } from './openDesktopApp.web';
/**
* Generates a deep linking URL based on the current window URL.
diff --git a/react/features/deep-linking/middleware.ts b/react/features/deep-linking/middleware.web.ts
similarity index 90%
rename from react/features/deep-linking/middleware.ts
rename to react/features/deep-linking/middleware.web.ts
index e4ef4a8aac..b982d90992 100644
--- a/react/features/deep-linking/middleware.ts
+++ b/react/features/deep-linking/middleware.web.ts
@@ -1,7 +1,7 @@
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { OPEN_DESKTOP_APP } from './actionTypes';
-import { openDesktopApp } from './functions';
+import { openDesktopApp } from './functions.web';
/**
* Implements the middleware of the deep linking feature.
diff --git a/react/features/deep-linking/openDesktopApp.ts b/react/features/deep-linking/openDesktopApp.web.ts
similarity index 94%
rename from react/features/deep-linking/openDesktopApp.ts
rename to react/features/deep-linking/openDesktopApp.web.ts
index 3793dd5b29..69e9815044 100644
--- a/react/features/deep-linking/openDesktopApp.ts
+++ b/react/features/deep-linking/openDesktopApp.web.ts
@@ -1,4 +1,4 @@
-import { executeAfterLoad } from '../app/functions';
+import { executeAfterLoad } from '../app/functions.web';
import { IReduxState } from '../app/types';
import { URI_PROTOCOL_PATTERN } from '../base/util/uri';