From 151833d2956052a2ba6fe7e85042c31eba3b5c36 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Sat, 18 Feb 2023 01:45:56 +0500 Subject: [PATCH] passed down query and hash params when app is opened from the browser --- desktop/main.js | 2 +- src/components/DeeplinkWrapper/index.website.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/main.js b/desktop/main.js index 9381ff0e2dfe..484398f8c363 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -246,7 +246,7 @@ const mainWindow = (() => { app.on('open-url', (event, url) => { event.preventDefault(); const urlObject = new URL(url); - deeplinkUrl = `${APP_DOMAIN}${urlObject.pathname}`; + deeplinkUrl = `${APP_DOMAIN}${urlObject.pathname}${urlObject.search}${urlObject.hash}`; if (browserWindow) { browserWindow.loadURL(deeplinkUrl); diff --git a/src/components/DeeplinkWrapper/index.website.js b/src/components/DeeplinkWrapper/index.website.js index cfcda9660ca8..5179ffa99da0 100644 --- a/src/components/DeeplinkWrapper/index.website.js +++ b/src/components/DeeplinkWrapper/index.website.js @@ -74,7 +74,7 @@ class DeeplinkWrapper extends PureComponent { openRouteInDesktopApp() { const expensifyUrl = new URL(CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL); - const expensifyDeeplinkUrl = `${CONST.DEEPLINK_BASE_URL}${expensifyUrl.host}${window.location.pathname}`; + const expensifyDeeplinkUrl = `${CONST.DEEPLINK_BASE_URL}${expensifyUrl.host}${window.location.pathname}${window.location.search}${window.location.hash}`; // This check is necessary for Safari, otherwise, if the user // does NOT have the Expensify desktop app installed, it's gonna