bigbluebutton-Github/bigbluebutton-html5/imports/api/2.0/chat/server/modifiers/clearChats.js
2017-07-11 13:57:54 -03:00

11 lines
316 B
JavaScript
Executable File

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)'));
}