bigbluebutton-Github/bigbluebutton-html5/imports/api/screenshare/server/modifiers/clearScreenshare.js
2019-03-14 10:15:31 -03:00

18 lines
573 B
JavaScript

import Logger from '/imports/startup/server/logger';
import Screenshare from '/imports/api/screenshare';
export default function clearScreenshare(meetingId, screenshareConf) {
const cb = (err) => {
if (err) {
return Logger.error(`removing screenshare to collection: ${err}`);
}
return Logger.info(`removed screenshare meetingId=${meetingId} id=${screenshareConf}`);
};
if (meetingId && screenshareConf) {
return Screenshare.remove({ meetingId, 'screenshare.screenshareConf': screenshareConf }, cb);
}
return Screenshare.remove({}, cb);
}