Things are in a pretty good working state. Ideally the Novi page should be a little more dynamic with changing the Jitsi settings. Or maybe the controls should be moved to the idaa/video_conferences page. Wrapping up for the day/week.
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
console.log('Jitsi: url_params:', url_params);
|
||||
|
||||
// --- Start with fallback data from URL ---
|
||||
let user_id = url_params.uuid;
|
||||
let user_id = url_params.uuid; // Novi Customer GUID
|
||||
let display_name = url_params.full_name ?? 'Guest';
|
||||
let email = (url_params.email ?? 'guest@example.com').replace(/\s+/g, '+');
|
||||
let is_moderator = false;
|
||||
@@ -89,14 +89,38 @@
|
||||
}
|
||||
|
||||
// --- Fetch dynamic data from Novi API ---
|
||||
const novi_api_key = $ae_loc.site_cfg_json?.novi_idaa_api_key;
|
||||
const novi_api_root_url = $ae_loc.site_cfg_json?.novi_api_root_url;
|
||||
const novi_api_key = $ae_loc.site_cfg_json?.novi_idaa_api_key; // For IDAA's Novi site
|
||||
const novi_api_headers = new Headers();
|
||||
novi_api_headers.append('Authorization', `Basic ${novi_api_key}`);
|
||||
const requestOptions = {
|
||||
method: 'GET',
|
||||
headers: novi_api_headers
|
||||
};
|
||||
console.log('Jitsi: Attempting to fetch moderator list from Novi API...');
|
||||
|
||||
console.log('Jitsi: Attempting to fetch IDAA member (Novi customer) details based on Novi customer GUID using Novi API...');
|
||||
|
||||
const full_novi_url_customers_guid = `${novi_api_root_url}/customers/${user_id}`;
|
||||
|
||||
await fetch(full_novi_url_customers_guid, requestOptions)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
let novi_current_user_obj = result;
|
||||
console.log(`Jitsi: Novi's Current User Obj:`, novi_current_user_obj);
|
||||
|
||||
let full_name = novi_current_user_obj?.Name;
|
||||
let first_name = novi_current_user_obj?.FirstName;
|
||||
let last_initial = novi_current_user_obj?.LastName
|
||||
? novi_current_user_obj.LastName.charAt(0).toUpperCase() + '.'
|
||||
: '';
|
||||
if (last_initial) {
|
||||
full_name = `${first_name} ${last_initial}`;
|
||||
}
|
||||
console.log(`Jitsi: Novi's Current User's Full Name: ${full_name}`);
|
||||
})
|
||||
.catch((error) => console.log('error', error));
|
||||
|
||||
console.log('Jitsi: Attempting to fetch moderator (Novi group members) list based on Novi group GUID using Novi API... There may be multiple groups to check.');
|
||||
|
||||
try {
|
||||
// Fetch the list of moderators from the Novi group
|
||||
@@ -108,9 +132,11 @@
|
||||
}
|
||||
|
||||
for (const group_guid of novi_idaa_group_guid_li) {
|
||||
const mod_list_url = `https://www.idaa.org/api/groups/${group_guid}/members?pageSize=200`;
|
||||
console.log(`Jitsi: Fetching moderator list from Novi API for group: ${group_guid}`);
|
||||
const mods_response = await fetch(mod_list_url, requestOptions);
|
||||
// const novi_url_groups_members = `/groups/members/${group_guid}/members`;
|
||||
const full_novi_url_groups_members = `${novi_api_root_url}/groups/${group_guid}/members?pageSize=200`;
|
||||
console.log(`Jitsi: Fetching moderator list from Novi API for group: ${group_guid} from URL: ${full_novi_url_groups_members}`);
|
||||
|
||||
const mods_response = await fetch(full_novi_url_groups_members, requestOptions);
|
||||
|
||||
if (mods_response.ok) {
|
||||
const groupModeratorsRaw = await mods_response.json();
|
||||
|
||||
Reference in New Issue
Block a user