bigbluebutton-Github/bigbluebutton-html5/imports/api/2.0/users/server/handlers/voiceUpdate.js

21 lines
520 B
JavaScript

import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import updateVoiceUser from '../modifiers/updateVoiceUser';
export default function handleVoiceUpdate({ payload }) {
const meetingId = payload.meeting_id;
const user = payload.user;
check(meetingId, String);
check(user, Object);
const voiceUser = user.voiceUser;
check(voiceUser, Object);
const userId = voiceUser.web_userid;
check(userId, String);
return updateVoiceUser(meetingId, userId, voiceUser);
}