bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/eventHandlers.js

15 lines
780 B
JavaScript
Raw Normal View History

import RedisPubSub from '/imports/startup/server/redis';
2016-10-21 21:21:09 +08:00
import handlePollStarted from './handlers/pollStarted';
2017-10-12 08:33:57 +08:00
import handlePollStopped from './handlers/pollStopped';
import handlePollPublished from './handlers/pollPublished';
2016-10-21 21:21:09 +08:00
import handleUserVoted from './handlers/userVoted';
2018-10-10 23:49:58 +08:00
import handleUserResponded from './handlers/userResponded';
import handleUserTypedResponse from './handlers/userTypedResponse';
2016-10-21 21:21:09 +08:00
2017-10-12 08:33:57 +08:00
RedisPubSub.on('PollShowResultEvtMsg', handlePollPublished);
RedisPubSub.on('PollStartedEvtMsg', handlePollStarted);
RedisPubSub.on('PollStoppedEvtMsg', handlePollStopped);
RedisPubSub.on('PollUpdatedEvtMsg', handleUserVoted);
2018-10-10 23:49:58 +08:00
RedisPubSub.on('UserRespondedToPollRespMsg', handleUserResponded);
RedisPubSub.on('UserRespondedToTypedPollRespMsg', handleUserTypedResponse);