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

21 lines
521 B
JavaScript
Raw Normal View History

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;
2017-02-24 04:35:36 +08:00
check(userId, String);
return updateVoiceUser(meetingId, userId, voiceUser);
};