bigbluebutton-Github/bigbluebutton-html5/imports/api/voice-users/server/handlers/mutedVoiceUser.js

18 lines
432 B
JavaScript
Raw Normal View History

2017-08-01 03:36:41 +08:00
import { check } from 'meteor/check';
import updateVoiceUser from '../modifiers/updateVoiceUser';
export default async function handleVoiceUpdate({ body }, meetingId) {
2017-08-01 03:36:41 +08:00
const voiceUser = body;
check(meetingId, String);
// If a person is muted we have to force them to not talking
if (voiceUser.muted) {
voiceUser.talking = false;
}
const result = await updateVoiceUser(meetingId, voiceUser);
return result;
2017-08-01 03:36:41 +08:00
}