From 96752e0d2f869d9c7e26a7d31bd7864734e9feb6 Mon Sep 17 00:00:00 2001 From: Gustavo Emanuel Farias Rosa Date: Thu, 30 Jun 2022 13:08:57 -0300 Subject: [PATCH] Solving problem when there is https in the url (#47) --- react-native/app/routes/component.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/react-native/app/routes/component.tsx b/react-native/app/routes/component.tsx index f7cabbd..7be5e0c 100644 --- a/react-native/app/routes/component.tsx +++ b/react-native/app/routes/component.tsx @@ -40,11 +40,14 @@ const DeepLink = ()=>{ if(roomName != 'bigbluebutton'){ NAME_PORTALS_DEEP_LINK = roomName } + let linkWhitoutSchemeAndName = linkWithoutScheme.replace(/^[A-z-.\w]+\//, '') - const linkWhitoutSchemeAndName = linkWithoutScheme.replace(/^[A-z-.\w]+\//, '') + if (!linkWhitoutSchemeAndName.includes('://')) { + linkWhitoutSchemeAndName = SCHEME_DEFAULT + linkWhitoutSchemeAndName + } const portalToAdd:IPortal = { name: NAME_PORTALS_DEEP_LINK, - url: SCHEME_DEFAULT+linkWhitoutSchemeAndName, + url: linkWhitoutSchemeAndName, temporary: true }