bigbluebutton-Github/bigbluebutton-html5/imports/api/2.0/chat/server/modifiers/clearChats.js

11 lines
316 B
JavaScript
Raw Normal View History

2017-07-12 00:57:54 +08:00
import Chat from '/imports/api/2.0/chat';
import Logger from '/imports/startup/server/logger';
export default function clearChats(meetingId) {
if (meetingId) {
return Chat.remove({ meetingId }, Logger.info(`Cleared Chats (${meetingId})`));
}
return Chat.remove({}, Logger.info('Cleared Chats (all)'));
}