bigbluebutton-Github/bigbluebutton-html5/imports/api/group-chat/server/handlers/groupChats.js

18 lines
372 B
JavaScript
Raw Normal View History

import { check } from 'meteor/check';
import addGroupChat from '../modifiers/addGroupChat';
export default function handleGroupChats({ body }, meetingId) {
const { chats } = body;
check(meetingId, String);
check(chats, Array);
const chatsAdded = [];
chats.forEach((chat) => {
chatsAdded.push(addGroupChat(meetingId, chat));
});
return chatsAdded;
}