custom URL related adjestments
This commit is contained in:
parent
f41c64acc8
commit
e262c601b7
|
|
@ -280,10 +280,10 @@
|
|||
}
|
||||
console.log("logged with new msg", msg);
|
||||
const loggedInResp = await context.jamClient.OnLoggedIn(msg); // ACTS AS CONTINUATION
|
||||
console.log("_DEBUG_ OnLoggedIn response (1)", loggedInResp);
|
||||
if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
handleLoggedInResponse(loggedInResp['CustomUrl']);
|
||||
}
|
||||
// console.log("_DEBUG_ OnLoggedIn response (1)", loggedInResp);
|
||||
// if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
// handleLoggedInResponse(loggedInResp['CustomUrl']);
|
||||
// }
|
||||
} catch (e) {
|
||||
console.log("fallback to old callback", e);
|
||||
const loggedInResp = await context.jamClient.OnLoggedIn(
|
||||
|
|
@ -291,10 +291,10 @@
|
|||
payload.token,
|
||||
payload.username
|
||||
); // ACTS AS CONTINUATION
|
||||
if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
console.log("_DEBUG_ OnLoggedIn response (2)", loggedInResp);
|
||||
handleLoggedInResponse(loggedInResp['CustomUrl']);
|
||||
}
|
||||
// if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
// console.log("_DEBUG_ OnLoggedIn response (2)", loggedInResp);
|
||||
// handleLoggedInResponse(loggedInResp['CustomUrl']);
|
||||
// }
|
||||
}
|
||||
|
||||
$.cookie("client_id", payload.client_id);
|
||||
|
|
|
|||
|
|
@ -506,9 +506,13 @@
|
|||
(d) => d.request_id !== deferred.request_id
|
||||
);
|
||||
} else if (evt_id) {
|
||||
|
||||
let method = Object.keys(response)[0]
|
||||
logger.log("[asyncJamClient] event received:", evt_id.toString(), Object.keys(response)[0])
|
||||
|
||||
// if(evt_id.toString() === '3012'){
|
||||
// alert(evt_id.toString())
|
||||
// }
|
||||
|
||||
switch (evt_id.toString()) {
|
||||
case '3006': //execute_script
|
||||
if(!response['execute_script'].match('HandleBridgeCallback2')){
|
||||
|
|
@ -546,9 +550,9 @@
|
|||
case '3012': //customUrl
|
||||
logger.log(`[asyncJamClient] 3012 CustomUrl: ${response['CustomUrl']}`);
|
||||
const customUrl = response['CustomUrl']
|
||||
window.location.href = customUrl
|
||||
//window.location.href = "http://www.jamkazam.local:3000/client#/createSession/custom~yes|privacy~2|description~hello|inviteeIds~27bd4a30-d1b8-4eea-8454-01a104d59381"
|
||||
//window.location.href = "http://www.jamkazam.local:3000/client#/joinSession/custom~yes|joinSessionId~2"
|
||||
window.location.href = customUrl
|
||||
break;
|
||||
// case '3013': //JKJoinSessionFromCustomUrlEvent
|
||||
// logger.log(`[asyncJamClient] 3013 JKJoinSessionFromCustomUrlEvent: ${response['JKJoinSessionFromCustomUrlEvent']['CustomUrl']}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue