diff --git a/src/CONFIG.js b/src/CONFIG.js index df13eb629ec0..a60b17e1e75b 100644 --- a/src/CONFIG.js +++ b/src/CONFIG.js @@ -17,6 +17,7 @@ const secureExpensifyUrl = Url.addTrailingForwardSlash(lodashGet( const useNgrok = lodashGet(Config, 'USE_NGROK', 'false') === 'true'; const useWebProxy = lodashGet(Config, 'USE_WEB_PROXY', 'true') === 'true'; const expensifyComWithProxy = getPlatform() === 'web' && useWebProxy ? '/' : expensifyURL; +const conciergeUrl = `${expensifyURL}concierge/`; // Throw errors on dev if config variables are not set correctly if (ENVIRONMENT === CONST.ENVIRONMENT.DEV) { @@ -48,6 +49,7 @@ export default { PARTNER_NAME: lodashGet(Config, 'EXPENSIFY_PARTNER_NAME', 'chat-expensify-com'), PARTNER_PASSWORD: lodashGet(Config, 'EXPENSIFY_PARTNER_PASSWORD', 'e21965746fd75f82bb66'), EXPENSIFY_CASH_REFERER: 'ecash', + CONCIERGE_URL: conciergeUrl, }, IS_IN_PRODUCTION: Platform.OS === 'web' ? process.env.NODE_ENV === 'production' : !__DEV__, IS_USING_LOCAL_WEB: useNgrok || expensifyURLRoot.includes('dev'), diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js index 0553b51cf650..e93ba851d996 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js @@ -24,7 +24,9 @@ const AnchorRenderer = (props) => { const attrHref = htmlAttribs.href || ''; const internalNewExpensifyPath = (attrHref.startsWith(CONST.NEW_EXPENSIFY_URL) && attrHref.replace(CONST.NEW_EXPENSIFY_URL, '')) || (attrHref.startsWith(CONST.STAGING_NEW_EXPENSIFY_URL) && attrHref.replace(CONST.STAGING_NEW_EXPENSIFY_URL, '')); - const internalExpensifyPath = attrHref.startsWith(CONFIG.EXPENSIFY.EXPENSIFY_URL) && attrHref.replace(CONFIG.EXPENSIFY.EXPENSIFY_URL, ''); + const internalExpensifyPath = attrHref.startsWith(CONFIG.EXPENSIFY.EXPENSIFY_URL) + && !attrHref.startsWith(CONFIG.EXPENSIFY.CONCIERGE_URL) + && attrHref.replace(CONFIG.EXPENSIFY.EXPENSIFY_URL, ''); // If we are handling a New Expensify link then we will assume this should be opened by the app internally. This ensures that the links are opened internally via react-navigation // instead of in a new tab or with a page refresh (which is the default behavior of an anchor tag) @@ -39,7 +41,7 @@ const AnchorRenderer = (props) => { ); } - // If we are handling an old dot Expensify link we need to open it with openOldDotLink() so we can navigate to it with the user already logged in. + // If we are handling an old dot Expensify link (excluding Concierge) we need to open it with openOldDotLink() so we can navigate to it with the user already logged in. // As attachments also use expensify.com we don't want it working the same as links. if (internalExpensifyPath && !isAttachment) { return (