bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/pollPublished.js

19 lines
538 B
JavaScript

import { check } from 'meteor/check';
import setPublishedPoll from '../../../meetings/server/modifiers/setPublishedPoll';
import handleSendSystemChatForPublishedPoll from './sendPollChatMsg';
const POLL_CHAT_MESSAGE = Meteor.settings.public.poll.chatMessage;
export default function pollPublished({ body }, meetingId) {
const { pollId } = body;
check(meetingId, String);
check(pollId, String);
setPublishedPoll(meetingId, true);
if (POLL_CHAT_MESSAGE) {
handleSendSystemChatForPublishedPoll({ body }, meetingId);
}
}