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