2017-02-24 02:52:50 +08:00
|
|
|
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);
|
2017-02-24 02:52:50 +08:00
|
|
|
|
|
|
|
return updateVoiceUser(meetingId, userId, voiceUser);
|
|
|
|
};
|