fix(idaa): preserve default sound mute settings when URL params absent
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user