bigbluebutton-Github/bigbluebutton-html5/imports/api/group-chat/server/modifiers/clearGroupChat.js
2018-03-09 15:42:14 -03:00

14 lines
497 B
JavaScript

import GroupChat from '/imports/api/group-chat';
import Logger from '/imports/startup/server/logger';
import clearGroupChatMsg from 'imports/api/group-chat-msg/server/modifiers/clearGroupChatMsg';
export default function clearGroupChat(meetingId) {
if (meetingId) {
clearGroupChatMsg(meetingId);
return GroupChat.remove({ meetingId }, Logger.info(`Cleared GroupChat (${meetingId})`));
}
clearGroupChatMsg();
return GroupChat.remove({}, Logger.info('Cleared GroupChat (all)'));
}