From 27f0bd21fb6f3ed770449748b70dcc393ff380ea Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 27 Mar 2026 14:31:34 -0400 Subject: [PATCH] fix(idaa): fall back to site config group list when g_uuid not in URL Older Novi pages that haven't been updated to pass g_uuid still need the moderator check to work. Use [g_uuid] when present, otherwise fall back to novi_idaa_group_guid_li from site config. Co-Authored-By: Claude Sonnet 4.6 --- .../idaa/(idaa)/video_conferences/+page.svelte | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/routes/idaa/(idaa)/video_conferences/+page.svelte b/src/routes/idaa/(idaa)/video_conferences/+page.svelte index 9423f315..6637c771 100644 --- a/src/routes/idaa/(idaa)/video_conferences/+page.svelte +++ b/src/routes/idaa/(idaa)/video_conferences/+page.svelte @@ -477,15 +477,20 @@ async function fetch_novi_data() { } } - // Use the group UUID from the URL param to check membership in that specific group. - // Each Jitsi iframe page passes the relevant group's UUID — this is more precise than - // checking against a global list of all IDAA moderator groups from site config. + // Moderator group check: prefer the g_uuid passed per-meeting in the URL (more precise), + // fall back to the global novi_idaa_group_guid_li from site config for older Novi pages + // that haven't been updated to pass g_uuid yet. const group_uuid = url_params.g_uuid ?? null; - if (!group_uuid) { - console.warn('Jitsi: No g_uuid in URL — skipping group moderator check.'); + const group_guid_li = group_uuid + ? [group_uuid] + : ($ae_loc.site_cfg_json?.novi_idaa_group_guid_li ?? []); + if (group_uuid) { + console.log(`Jitsi: Checking moderator via URL g_uuid: ${group_uuid}`); + } else { + console.log(`Jitsi: No g_uuid in URL — falling back to site config group list (${group_guid_li.length} groups).`); } const moderatorIdSet = await get_novi_group_moderators( - group_uuid ? [group_uuid] : [], + group_guid_li, novi_api_root_url, novi_api_key );