bigbluebutton-Github/bigbluebutton-html5/imports/api/screenshare/server/modifiers/clearScreenshare.js

18 lines
573 B
JavaScript
Raw Normal View History

import Logger from '/imports/startup/server/logger';
import Screenshare from '/imports/api/screenshare';
export default function clearScreenshare(meetingId, screenshareConf) {
2019-03-14 21:15:31 +08:00
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) {
2019-03-14 21:15:31 +08:00
return Screenshare.remove({ meetingId, 'screenshare.screenshareConf': screenshareConf }, cb);
}
2019-03-14 21:15:31 +08:00
return Screenshare.remove({}, cb);
}