add lock settings notifications - akka-apps
This commit is contained in:
parent
d62b2d4f2e
commit
28414c1a5a
@ -7,6 +7,7 @@ import org.bigbluebutton.core.running.OutMsgRouter
|
||||
import org.bigbluebutton.core.running.MeetingActor
|
||||
import org.bigbluebutton.core2.MeetingStatus2x
|
||||
import org.bigbluebutton.core2.Permissions
|
||||
import org.bigbluebutton.core2.message.senders.{ MsgBuilder }
|
||||
|
||||
trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
|
||||
this: MeetingActor =>
|
||||
@ -40,13 +41,153 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
|
||||
|
||||
MeetingStatus2x.setPermissions(liveMeeting.status, settings)
|
||||
|
||||
if (!oldPermissions.disableMic && settings.disableMic) {
|
||||
// Apply lock settings when disableMic from false to true.
|
||||
LockSettingsUtil.enforceLockSettingsForAllVoiceUsers(liveMeeting, outGW)
|
||||
if (oldPermissions.disableCam != settings.disableCam) {
|
||||
if (settings.disableCam) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.disableCam",
|
||||
"Label to disable cam notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
|
||||
LockSettingsUtil.enforceCamLockSettingsForAllUsers(liveMeeting, outGW)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.enableCam",
|
||||
"Label to enable cam notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
|
||||
if (!oldPermissions.disableCam && settings.disableCam) {
|
||||
LockSettingsUtil.enforceCamLockSettingsForAllUsers(liveMeeting, outGW)
|
||||
if (oldPermissions.disableMic != settings.disableMic) {
|
||||
if (settings.disableMic) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.disableMic",
|
||||
"Label to disable mic notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
|
||||
// Apply lock settings when disableMic from false to true.
|
||||
LockSettingsUtil.enforceLockSettingsForAllVoiceUsers(liveMeeting, outGW)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.enableMic",
|
||||
"Label to enable mic notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
|
||||
if (oldPermissions.disablePrivChat != settings.disablePrivChat) {
|
||||
if (settings.disablePrivChat) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.disablePrivChat",
|
||||
"Label to disable private chat notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.enablePrivChat",
|
||||
"Label to enable private chat notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
|
||||
if (oldPermissions.disablePubChat != settings.disablePubChat) {
|
||||
if (settings.disablePubChat) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.disablePubChat",
|
||||
"Label to disable public chat notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.enablePubChat",
|
||||
"Label to enable public chat notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
|
||||
if (oldPermissions.disableNotes != settings.disableNotes) {
|
||||
if (settings.disableNotes) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.disableNotes",
|
||||
"Label to disable shared notes notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.enableNotes",
|
||||
"Label to enable shared notes notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
|
||||
if (oldPermissions.hideUserList != settings.hideUserList) {
|
||||
if (settings.hideUserList) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.hideUserList",
|
||||
"Label to disable user list notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.showUserList",
|
||||
"Label to enable user list notification",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
|
||||
val routing = Routing.addMsgToClientRouting(
|
||||
|
@ -4,6 +4,7 @@ import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.apps.PermissionCheck
|
||||
import org.bigbluebutton.core.bus.MessageBus
|
||||
import org.bigbluebutton.core.running.LiveMeeting
|
||||
import org.bigbluebutton.core2.message.senders.{ MsgBuilder }
|
||||
|
||||
trait UpdateWebcamsOnlyForModeratorCmdMsgHdlr {
|
||||
this: WebcamApp2x =>
|
||||
@ -48,6 +49,29 @@ trait UpdateWebcamsOnlyForModeratorCmdMsgHdlr {
|
||||
) match {
|
||||
case Some(value) => {
|
||||
log.info(s"Change webcams only for moderator status. meetingId=${meetingId} value=${value}")
|
||||
|
||||
if (value) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
meetingId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.webcamsOnlyForModerator",
|
||||
"Label to disable all webcams except for the moderators cam",
|
||||
Vector()
|
||||
)
|
||||
bus.outGW.send(notifyEvent)
|
||||
} else {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
meetingId,
|
||||
"info",
|
||||
"lock",
|
||||
"app.userList.userOptions.enableOnlyModeratorWebcam",
|
||||
"Label to enable all webcams except for the moderators cam",
|
||||
Vector()
|
||||
)
|
||||
bus.outGW.send(notifyEvent)
|
||||
}
|
||||
|
||||
broadcastEvent(meetingId, msg.body.setBy, value)
|
||||
}
|
||||
case _ =>
|
||||
|
Loading…
Reference in New Issue
Block a user