From 7f693b7e54b33c6bb23e21fbdb437c4343b59278 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Thu, 17 Oct 2024 14:31:49 +0530 Subject: [PATCH] bug fixing in custom url app launching --- web/app/assets/javascripts/scheduled_session.js.erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/app/assets/javascripts/scheduled_session.js.erb b/web/app/assets/javascripts/scheduled_session.js.erb index d455ca8f3..bf5bbc589 100644 --- a/web/app/assets/javascripts/scheduled_session.js.erb +++ b/web/app/assets/javascripts/scheduled_session.js.erb @@ -1553,16 +1553,14 @@ function createSessionByCustomUrlScheme(){ //an example URL would be: https://www.jamkazam.com/client#/createSession/custom~yes|privacy~2|description~hello|inviteeIds~1,2,3,4 - if(context.location.hash === '' || context.location.hash.match(/custom~yes/) === null){ - return; - } + var hash = decodeURIComponent(context.location.hash); - var hash = decodeURIComponent(context.location.hash); - if(hash.indexOf('custom~yes') === -1){ + if(hash === '' || hash.match(/custom~yes/) === null){ return; } var qStr = hash.substring(hash.lastIndexOf('/') + 1); + //decode the query params according to the custom format var qParamsArr = qStr.split('|'); var isCustom, privacy, description, inviteeIds;