From c8eeb699796b28a814daea342ed6b9409ea1560b Mon Sep 17 00:00:00 2001 From: Bohdan Zhemelinskyi Date: Mon, 14 Feb 2022 21:05:10 +0000 Subject: [PATCH] fixedPhoneLock --- ...hangeLockSettingsInMeetingCmdMsgHdlr.scala | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala index 0517248f0d..d424532bdb 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala @@ -3,6 +3,7 @@ package org.bigbluebutton.core.apps.users import org.bigbluebutton.LockSettingsUtil import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait } +import org.bigbluebutton.core.models._ import org.bigbluebutton.core.running.OutMsgRouter import org.bigbluebutton.core.running.MeetingActor import org.bigbluebutton.core2.MeetingStatus2x @@ -42,6 +43,25 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait { if (!oldPermissions.disableMic && settings.disableMic) { // Apply lock settings when disableMic from false to true. LockSettingsUtil.enforceLockSettingsForAllVoiceUsers(liveMeeting, outGW) + + // Dial-in + def buildLockMessage(meetingId: String, userId: String, lockedBy: String, locked: Boolean): BbbCommonEnvCoreMsg = { + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId) + val envelope = BbbCoreEnvelope(UserLockedInMeetingEvtMsg.NAME, routing) + val body = UserLockedInMeetingEvtMsgBody(userId, locked, lockedBy) + val header = BbbClientMsgHeader(UserLockedInMeetingEvtMsg.NAME, meetingId, userId) + val event = UserLockedInMeetingEvtMsg(header, body) + + BbbCommonEnvCoreMsg(envelope, event) + } + + VoiceUsers.findAll(liveMeeting.voiceUsers) foreach { vu => + if (vu.intId.startsWith(IntIdPrefixType.DIAL_IN)) { // only Dial-in users need this + val eventExplicitLock = buildLockMessage(liveMeeting.props.meetingProp.intId, vu.intId, msg.body.setBy, settings.disableMic) + outGW.send(eventExplicitLock) + } + } + } if (!oldPermissions.disableCam && settings.disableCam) {