bigbluebutton-Github/bigbluebutton-html5/imports/api/group-chat/server/handlers/groupChats.js
2023-03-20 16:37:51 -03:00

15 lines
353 B
JavaScript

import { check } from 'meteor/check';
import addGroupChat from '../modifiers/addGroupChat';
export default async function handleGroupChats({ body }, meetingId) {
const { chats } = body;
check(meetingId, String);
check(chats, Array);
await new Promise
.all(chats.map(async (chat) => {
await addGroupChat(meetingId, chat);
}));
}