From 1c57db94bb15d07dfb26c6f15e80ef7b42c42893 Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Thu, 27 Jun 2024 21:22:32 -0300 Subject: [PATCH] fix(audio): always send unhold Alway send the unhold command since it doesn't change flip the state (contrary to the uuid_hold toggle command). It's not idempotent, though - so always update the internal hold state to prevent state mismatches preventing channels from being unheld. --- ...ListenOnlyModeToggledInSfuEvtMsgHdlr.scala | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/ListenOnlyModeToggledInSfuEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/ListenOnlyModeToggledInSfuEvtMsgHdlr.scala index b8eef0bc75..b2e137c1e6 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/ListenOnlyModeToggledInSfuEvtMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/voice/ListenOnlyModeToggledInSfuEvtMsgHdlr.scala @@ -25,24 +25,24 @@ trait ListenOnlyModeToggledInSfuEvtMsgHdlr { // opposite of what we want. // The unhold (uuid_hold off) command is not affected by this, but we don't // want to send it if the channel is already unheld. - if (msg.body.enabled != vu.hold) { + if ((msg.body.enabled && !vu.hold) || !msg.body.enabled) { VoiceApp.holdChannelInVoiceConf( liveMeeting, outGW, vu.uuid, msg.body.enabled ) - } else { - // If the channel is already in the desired state, just make sure - // any pending mute or unmute commands are sent. - VoiceApp.handleChannelHoldChanged( - liveMeeting, - outGW, - msg.body.userId, - vu.uuid, - msg.body.enabled - ) } + + // If the channel is already in the desired state, just make sure + // any pending mute or unmute commands are sent. + VoiceApp.handleChannelHoldChanged( + liveMeeting, + outGW, + msg.body.userId, + vu.uuid, + msg.body.enabled + ) } } }