bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/handlers/meetingEnd.js
2019-04-05 15:10:05 -03:00

27 lines
555 B
JavaScript

import { check } from 'meteor/check';
import meetingHasEnded from '../modifiers/meetingHasEnded';
import Meetings from '/imports/api/meetings';
import Breakouts from '/imports/api/breakouts';
export default function handleMeetingEnd({ body }, meetingId) {
check(meetingId, String);
Meetings.update({
meetingId,
}, {
$set: {
meetingEnded: true,
},
});
Breakouts.update({
parentMeetingId: meetingId,
}, {
$set: {
meetingEnded: true,
},
});
return setTimeout(() => meetingHasEnded(meetingId), 1000);
}