diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SelectRandomViewerReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SelectRandomViewerReqMsgHdlr.scala index 54b13f5a21..762012dc4c 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SelectRandomViewerReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SelectRandomViewerReqMsgHdlr.scala @@ -50,7 +50,7 @@ trait SelectRandomViewerReqMsgHdlr extends RightsManagementTrait { Users2x.setUserExempted(liveMeeting.users2x, pickedUser, true) } } - + val userIds = users.map { case (v) => v.intId } broadcastEvent(msg, userIds, pickedUser) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala index e49cb48bde..d588934f43 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/EjectUserFromVoiceCmdMsgHdlr.scala @@ -22,10 +22,12 @@ trait EjectUserFromVoiceCmdMsgHdlr extends RightsManagementTrait { for { u <- VoiceUsers.findWithIntId(liveMeeting.voiceUsers, msg.body.userId) } yield { - log.info("Ejecting user from voice. meetingId=" + props.meetingProp.intId + " userId=" + u.intId) - VoiceUsers.ban(liveMeeting.voiceUsers, u) + log.info("Ejecting user from voice. meetingId=" + props.meetingProp.intId + " userId=" + u.intId + " ban=" + msg.body.banUser) val event = MsgBuilder.buildEjectUserFromVoiceConfSysMsg(props.meetingProp.intId, props.voiceProp.voiceConf, u.voiceUserId) outGW.send(event) + if (msg.body.banUser) { + VoiceUsers.ban(liveMeeting.voiceUsers, u) + } } } } diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala index 8b6c811507..ec10aa4a80 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/VoiceConfMsgs.scala @@ -217,7 +217,7 @@ case class EjectUserFromVoiceCmdMsg( header: BbbClientMsgHeader, body: EjectUserFromVoiceCmdMsgBody ) extends StandardMsg -case class EjectUserFromVoiceCmdMsgBody(userId: String, ejectedBy: String) +case class EjectUserFromVoiceCmdMsgBody(userId: String, ejectedBy: String, banUser: Boolean) /** * Sent by client to mute all users except presenters in the voice conference. diff --git a/bigbluebutton-html5/imports/api/voice-users/server/methods/ejectUserFromVoice.js b/bigbluebutton-html5/imports/api/voice-users/server/methods/ejectUserFromVoice.js index 4c68bc3a1b..5705adf9fc 100644 --- a/bigbluebutton-html5/imports/api/voice-users/server/methods/ejectUserFromVoice.js +++ b/bigbluebutton-html5/imports/api/voice-users/server/methods/ejectUserFromVoice.js @@ -4,7 +4,7 @@ import RedisPubSub from '/imports/startup/server/redis'; import { extractCredentials } from '/imports/api/common/server/helpers'; import Logger from '/imports/startup/server/logger'; -export default function ejectUserFromVoice(userId) { +export default function ejectUserFromVoice(userId, banUser) { try { const REDIS_CONFIG = Meteor.settings.private.redis; const CHANNEL = REDIS_CONFIG.channels.toAkkaApps; @@ -15,10 +15,12 @@ export default function ejectUserFromVoice(userId) { check(meetingId, String); check(requesterUserId, String); check(userId, String); + check(banUser, Boolean); const payload = { userId, ejectedBy: requesterUserId, + banUser, }; RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload); diff --git a/bigbluebutton-html5/imports/ui/components/user-list/service.js b/bigbluebutton-html5/imports/ui/components/user-list/service.js index f97763fc4f..c5b0df1dc0 100755 --- a/bigbluebutton-html5/imports/ui/components/user-list/service.js +++ b/bigbluebutton-html5/imports/ui/components/user-list/service.js @@ -30,9 +30,9 @@ const STARTED_CHAT_LIST_KEY = 'startedChatList'; const CUSTOM_LOGO_URL_KEY = 'CustomLogoUrl'; -export const setCustomLogoUrl = path => Storage.setItem(CUSTOM_LOGO_URL_KEY, path); +export const setCustomLogoUrl = (path) => Storage.setItem(CUSTOM_LOGO_URL_KEY, path); -export const setModeratorOnlyMessage = msg => Storage.setItem('ModeratorOnlyMessage', msg); +export const setModeratorOnlyMessage = (msg) => Storage.setItem('ModeratorOnlyMessage', msg); const getCustomLogoUrl = () => Storage.getItem(CUSTOM_LOGO_URL_KEY); @@ -304,7 +304,7 @@ const isMeetingLocked = (id) => { let isLocked = false; if (meeting.lockSettingsProps !== undefined) { - const {lockSettingsProps:lockSettings, usersProp} = meeting; + const { lockSettingsProps: lockSettings, usersProp } = meeting; if (lockSettings.disableCam || lockSettings.disableMic @@ -447,7 +447,7 @@ const assignPresenter = (userId) => { makeCall('assignPresenter', userId); }; const removeUser = (userId, banUser) => { if (isVoiceOnlyUser(userId)) { - makeCall('ejectUserFromVoice', userId); + makeCall('ejectUserFromVoice', userId, banUser); } else { makeCall('removeUser', userId, banUser); }