2017-07-22 03:34:28 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import removeMeeting from '../modifiers/removeMeeting';
|
2019-03-20 04:06:13 +08:00
|
|
|
import Meetings from '/imports/api/meetings';
|
|
|
|
import Breakouts from '/imports/api/breakouts';
|
2017-07-22 03:34:28 +08:00
|
|
|
|
2017-10-11 02:30:45 +08:00
|
|
|
export default function handleMeetingEnd({ body }, meetingId) {
|
2017-07-22 03:34:28 +08:00
|
|
|
check(meetingId, String);
|
|
|
|
|
2019-03-20 04:06:13 +08:00
|
|
|
Meetings.update({
|
|
|
|
meetingId,
|
|
|
|
}, {
|
|
|
|
$set: {
|
|
|
|
meetingEnded: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
Breakouts.update({
|
|
|
|
parentMeetingId: meetingId,
|
|
|
|
}, {
|
|
|
|
$set: {
|
|
|
|
meetingEnded: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
return setTimeout(() => removeMeeting(meetingId), 10000);
|
2017-07-22 03:34:28 +08:00
|
|
|
}
|