From 5fdb7c176c47c1861adb4871c5d875e834ec0b5f Mon Sep 17 00:00:00 2001 From: Mihai Uscat Date: Mon, 11 May 2020 13:38:30 +0300 Subject: [PATCH] feat(MobileDeepLinking): Enable custom deeplinking domain --- interface_config.js | 11 +++++++++++ .../components/DeepLinkingMobilePage.web.js | 7 +++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/interface_config.js b/interface_config.js index 7db8ba2719..574ad95ff6 100644 --- a/interface_config.js +++ b/interface_config.js @@ -230,6 +230,17 @@ var interfaceConfig = { */ // MOBILE_DOWNLOAD_LINK_IOS: 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905', + /** + * Specify Firebase dynamic link properties for the mobile apps. + */ + // MOBILE_DYNAMIC_LINK: { + // APN: 'org.jitsi.meet', + // APP_CODE: 'w2atb', + // CUSTOM_DOMAIN: undefined, + // IBI: 'com.atlassian.JitsiMeet.ios', + // ISI: '1165103905' + // }, + /** * Specify mobile app scheme for opening the app from the mobile browser. */ diff --git a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js index 09a8646ee5..36d695900e 100644 --- a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js +++ b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js @@ -165,7 +165,7 @@ class DeepLinkingMobilePage extends Component { _generateDownloadURL() { const url = _URLS[Platform.OS]; - if (url) { + if (url && typeof interfaceConfig.MOBILE_DYNAMIC_LINK === 'undefined') { return url; } @@ -175,12 +175,15 @@ class DeepLinkingMobilePage extends Component { const { APN = 'org.jitsi.meet', APP_CODE = 'w2atb', + CUSTOM_DOMAIN = undefined, IBI = 'com.atlassian.JitsiMeet.ios', ISI = '1165103905' } = interfaceConfig.MOBILE_DYNAMIC_LINK || {}; + + const domain = CUSTOM_DOMAIN ?? `https://${APP_CODE}.app.goo.gl`; const IUS = interfaceConfig.APP_SCHEME || 'org.jitsi.meet'; - return `https://${APP_CODE}.app.goo.gl/?link=${ + return `${domain}/?link=${ encodeURIComponent(window.location.href)}&apn=${ APN}&ibi=${ IBI}&isi=${