add debug log entries to identify possible errors when creating a session using custom URL

This commit is contained in:
Nuwan 2024-10-23 23:42:48 +05:30
parent cef7f1efbe
commit 489f3a685d
1 changed files with 5 additions and 0 deletions

View File

@ -499,6 +499,7 @@
}
else {
var instruments_me = [];
console.log("** getCreatorInstruments() (1)", getCreatorInstruments());
$.each(getCreatorInstruments(), function(index, instrument) {
instruments_me.push(instrument.name);
});
@ -884,6 +885,7 @@
data.friends_can_join = createSessionSettings.friends_can_join;
data.rsvp_slots = [];
console.log("** startSession getCreatorInstruments (2): " + getCreatorInstruments());
$.each(getCreatorInstruments(), function(index, instrument) {
var slot = {};
slot.instrument_id = instrument.id;
@ -893,6 +895,7 @@
});
var otherInstruments = instrumentRSVP.getSelectedInstruments();
console.log("** startSession getSelectedInstruments: " + otherInstruments);
data.isUnstructuredRsvp = otherInstruments.length == 0 && userSelectedSlots(createSessionSettings.createType);
$.each(instrumentRSVP.getSelectedInstruments(), function(index, instrument) {
for (var i = 0; i < instrument.count; i++) {
@ -903,6 +906,7 @@
data.rsvp_slots.push(slot);
}
});
console.log("** startSession data.rsvp_slots: " + data.rsvp_slots);
}
var joinSession = function(sessionId) {
@ -1507,6 +1511,7 @@
// asks the instrument selector for the creator's specified instruments, and defaults to Other/Beginner if none were selected
function getCreatorInstruments() {
var instruments = instrumentSelector.getSelectedInstruments();
console.log("** getCreatorInstruments getSelectedInstruments (0)", instruments)
if(instruments.length == 0) {
var otherId = context.JK.server_to_client_instrument_map.Other.server_id; // get server ID
var otherInstrumentInfo = context.JK.instrument_id_to_instrument[otherId]; // get display name