"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bigbluebutton-html5/imports/api/meetings/server/handlers/meetingEnd.js" between
bigbluebutton-2.3.6.tar.gz and bigbluebutton-2.3.7.tar.gz

About: BigBlueButton is a complete web conferencing system (mainly designed for online learning).

meetingEnd.js  (bigbluebutton-2.3.6):meetingEnd.js  (bigbluebutton-2.3.7)
import { check } from 'meteor/check'; import { check } from 'meteor/check';
import meetingHasEnded from '../modifiers/meetingHasEnded'; import meetingHasEnded from '../modifiers/meetingHasEnded';
import Meetings from '/imports/api/meetings'; import Meetings from '/imports/api/meetings';
import Breakouts from '/imports/api/breakouts'; import Breakouts from '/imports/api/breakouts';
import Logger from '/imports/startup/server/logger'; import Logger from '/imports/startup/server/logger';
export default function handleMeetingEnd({ header, body }) { export default function handleMeetingEnd({ header, body }) {
check(body, Object); check(body, Object);
const { meetingId } = body; const { meetingId, reason } = body;
check(meetingId, String); check(meetingId, String);
check(header, Object); check(header, Object);
const { userId } = header; const { userId } = header;
check(userId, String); check(userId, String);
const cb = (err, num, meetingType) => { const cb = (err, num, meetingType) => {
if (err) { if (err) {
Logger.error(`${meetingType} ending error: ${err}`); Logger.error(`${meetingType} ending error: ${err}`);
return; return;
} }
if (num) { if (num) {
Meteor.setTimeout(() => { meetingHasEnded(meetingId); }, 10000); Meteor.setTimeout(() => { meetingHasEnded(meetingId); }, 10000);
} }
}; };
Meetings.update({ meetingId }, Meetings.update({ meetingId },
{ $set: { meetingEnded: true, meetingEndedBy: userId } }, { $set: { meetingEnded: true, meetingEndedBy: userId, meetingEndedReason: re ason } },
(err, num) => { cb(err, num, 'Meeting'); }); (err, num) => { cb(err, num, 'Meeting'); });
Breakouts.update({ parentMeetingId: meetingId }, Breakouts.update({ parentMeetingId: meetingId },
{ $set: { meetingEnded: true } }, { $set: { meetingEnded: true } },
(err, num) => { cb(err, num, 'Breakout'); }); (err, num) => { cb(err, num, 'Breakout'); });
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)