diff --git a/react/features/deep-linking/functions.js b/react/features/deep-linking/functions.js index f26b9e98e..d4de8cfbf 100644 --- a/react/features/deep-linking/functions.js +++ b/react/features/deep-linking/functions.js @@ -75,7 +75,7 @@ export function getDeepLinkingPage(state) { return Promise.resolve(); } - return _openDesktopApp().then( + return _openDesktopApp(state).then( // eslint-disable-next-line no-confusing-arrow result => result ? DeepLinkingDesktopPage : undefined); } @@ -83,9 +83,10 @@ export function getDeepLinkingPage(state) { /** * Opens the desktop app. * + * @param {Object} state - Object containing current redux state. * @returns {Promise} - Resolves with true if the attempt to open the desktop app was successful and resolves * with false otherwise. */ -export function openDesktopApp() { - return _openDesktopApp(); +export function openDesktopApp(state) { + return _openDesktopApp(state); } diff --git a/react/features/deep-linking/middleware.js b/react/features/deep-linking/middleware.js index 6facca567..6e4111c7f 100644 --- a/react/features/deep-linking/middleware.js +++ b/react/features/deep-linking/middleware.js @@ -15,7 +15,7 @@ import { openDesktopApp } from './functions'; MiddlewareRegistry.register(store => next => action => { switch (action.type) { case OPEN_DESKTOP_APP: - openDesktopApp(); + openDesktopApp(store.getState()); break; } diff --git a/react/features/deep-linking/openDesktopApp.js b/react/features/deep-linking/openDesktopApp.js index 3df29ab38..7aa6e6c9f 100644 --- a/react/features/deep-linking/openDesktopApp.js +++ b/react/features/deep-linking/openDesktopApp.js @@ -1,9 +1,12 @@ +// @flow + /** * Opens the desktop app. * + * @param {Object} state - Object containing current redux state. * @returns {Promise} - Resolves with true if the attempt to open the desktop app was successful and resolves * with false otherwise. */ -export function _openDesktopApp() { +export function _openDesktopApp(state: Object) { // eslint-disable-line no-unused-vars return Promise.resolve(false); }