Merge pull request #14088 from zhem0004/fixPhoneBan
Fix: Removing phone users always bans them
This commit is contained in:
commit
2e72946bc1
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user