bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/eventHandlers.js
2021-02-19 10:57:11 -03:00

17 lines
937 B
JavaScript

import RedisPubSub from '/imports/startup/server/redis';
import handlePollStarted from './handlers/pollStarted';
import handlePollStopped from './handlers/pollStopped';
import handlePollPublished from './handlers/pollPublished';
import handleSendSystemChatForPublishedPoll from './handlers/sendPollChatMsg';
import handleUserVoted from './handlers/userVoted';
import handleUserResponded from './handlers/userResponded';
import handleUserTypedResponse from './handlers/userTypedResponse';
RedisPubSub.on('PollShowResultEvtMsg', handlePollPublished);
RedisPubSub.on('PollShowResultEvtMsg', handleSendSystemChatForPublishedPoll);
RedisPubSub.on('PollStartedEvtMsg', handlePollStarted);
RedisPubSub.on('PollStoppedEvtMsg', handlePollStopped);
RedisPubSub.on('PollUpdatedEvtMsg', handleUserVoted);
RedisPubSub.on('UserRespondedToPollRespMsg', handleUserResponded);
RedisPubSub.on('UserRespondedToTypedPollRespMsg', handleUserTypedResponse);