debug custom URL handling in app
This commit is contained in:
parent
a17c29216c
commit
8ae89c1cbb
|
|
@ -303,9 +303,7 @@
|
|||
}
|
||||
console.log("logged with new msg", msg);
|
||||
const loggedInResp = await context.jamClient.OnLoggedIn(msg); // ACTS AS CONTINUATION
|
||||
alert(
|
||||
"JamServer: loggedInResp received: " + JSON.stringify(loggedInResp)
|
||||
);
|
||||
//handle customUrl
|
||||
if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
const customUrl = loggedInResp['CustomUrl']
|
||||
handleCustomUrl(customUrl);
|
||||
|
|
|
|||
|
|
@ -556,7 +556,6 @@
|
|||
break;
|
||||
case '3012': //customUrl
|
||||
const customUrl = response['CustomUrl']
|
||||
alert('3012', customUrl)
|
||||
//if localStorage is available and has customUrl key, remove it
|
||||
if(localStorage){
|
||||
if(localStorage.getItem('customUrl')){
|
||||
|
|
@ -573,7 +572,6 @@
|
|||
window.location.href = httpUrl;
|
||||
}
|
||||
}else{
|
||||
alert('Error: Invalid customUrl received.')
|
||||
logger.log(`[asyncJamClient] invalid customUrl: ${httpUrl}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,23 +25,23 @@
|
|||
|
||||
//handle create session. #/createSession is a valid hash. switch to the createSession screen and handle creating a session from the custom URL
|
||||
if (hash.includes("#/createSession/")) { // if the hash contains the createSession flag
|
||||
// if(context.SessionStore.inSession()){
|
||||
// // if the user is already in a session, show a notification
|
||||
// console.log("You are already in a session. Please leave the session to create a new one.");
|
||||
// alert("You are already in a session. Please leave the session to create a new one.");
|
||||
// clearInterval(screenLoadInterval);
|
||||
// return;
|
||||
// }
|
||||
if (JK.createScheduledSessionScreen && JK.CreateScheduledSessionDataIsLoaded) { // if the createScheduledSessionScreen is loaded
|
||||
JK.createScheduledSessionScreen.createSessionByCustomUrlScheme(hash); // this will create a session
|
||||
clearInterval(screenLoadInterval);
|
||||
} else {
|
||||
console.log("attempting to create session. ", maxAttempts);
|
||||
maxAttempts--;
|
||||
if (maxAttempts <= 0) {
|
||||
if(context.SessionStore && context.SessionStore.inSession()){
|
||||
// clearInterval(screenLoadInterval);
|
||||
// return;
|
||||
}else{
|
||||
console.log("attempting to create session", maxAttempts);
|
||||
if (JK.createScheduledSessionScreen && JK.CreateScheduledSessionDataIsLoaded) { // if the createScheduledSessionScreen is loaded
|
||||
JK.createScheduledSessionScreen.createSessionByCustomUrlScheme(hash); // this will create a session
|
||||
clearInterval(screenLoadInterval);
|
||||
} else {
|
||||
console.log("attempting to create session. ", maxAttempts);
|
||||
maxAttempts--;
|
||||
if (maxAttempts <= 0) {
|
||||
clearInterval(screenLoadInterval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//handle join session. there is no joinSession screen. JK.SessionUtils is a helper class that handles joining a session
|
||||
|
|
|
|||
Loading…
Reference in New Issue