bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/handlers/voiceUpdate.js
2017-03-02 16:08:49 +00:00

21 lines
521 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);
};