bigbluebutton-Github/bigbluebutton-html5/imports/api/2.0/voice-users/server/modifiers/removeVoiceUser.js

16 lines
514 B
JavaScript
Raw Normal View History

2017-08-01 03:36:41 +08:00
import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import VoiceUser from '/imports/api/2.0/voice-users';
export default function removeVoiceUser(meetingId, voiceUser) {
check(meetingId, String);
check(voiceUser, {
voiceConf: String,
voiceUserId: String,
});
const { voiceConf, voiceUserId } = voiceUser;
return VoiceUser.remove({ meetingId, voiceConf, voiceUserId }, Logger.info(`Remove VoiceUser voiceUserId=${voiceUserId} meetingId=${meetingId}`));
}