From 8fabaf28f7d975cea65bb1396113b521c9c5b750 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 31 Mar 2026 19:04:11 -0400 Subject: [PATCH] fix(idaa): preserve default sound mute settings when URL params absent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unconditional assignment was overwriting $state defaults (incoming msg, reactions, raise hand all muted) with false whenever the iframe template didn't pass the sound URL params — which it never does. Co-Authored-By: Claude Sonnet 4.6 --- .../(idaa)/video_conferences/+page.svelte | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/routes/idaa/(idaa)/video_conferences/+page.svelte b/src/routes/idaa/(idaa)/video_conferences/+page.svelte index ba85324f..0b92815d 100644 --- a/src/routes/idaa/(idaa)/video_conferences/+page.svelte +++ b/src/routes/idaa/(idaa)/video_conferences/+page.svelte @@ -429,14 +429,19 @@ async function fetch_novi_data() { room_name = url_params.room ?? 'Default-Room'; domain = url_params.domain ?? 'jitsi.dgrzone.com'; - // Initialize sound settings from URL params - disable_incoming_msg_sound = url_params.incoming_msg_sound === 'true'; - disable_participant_joined_sound = - url_params.participant_joined_sound === 'true'; - disable_participant_left_sound = - url_params.participant_left_sound === 'true'; - disable_reaction_sound = url_params.reaction_sound === 'true'; - disable_raise_hand_sound = url_params.raise_hand_sound === 'true'; + // Override sound defaults from URL params only when explicitly provided. + // If the param is absent (null), keep the $state defaults — the iframe template + // does not pass these params, so unconditional assignment would wipe out the defaults. + if (url_params.incoming_msg_sound !== null) + disable_incoming_msg_sound = url_params.incoming_msg_sound === 'true'; + if (url_params.participant_joined_sound !== null) + disable_participant_joined_sound = url_params.participant_joined_sound === 'true'; + if (url_params.participant_left_sound !== null) + disable_participant_left_sound = url_params.participant_left_sound === 'true'; + if (url_params.reaction_sound !== null) + disable_reaction_sound = url_params.reaction_sound === 'true'; + if (url_params.raise_hand_sound !== null) + disable_raise_hand_sound = url_params.raise_hand_sound === 'true'; if (log_lvl) { console.log(