2018-03-10 02:42:14 +08:00
|
|
|
import RedisPubSub from '/imports/startup/server/redis';
|
|
|
|
import handleGroupChatMsgBroadcast from './handlers/groupChatMsgBroadcast';
|
2018-08-03 01:23:20 +08:00
|
|
|
import handleClearPublicGroupChat from './handlers/clearPublicGroupChat';
|
2019-07-31 10:37:50 +08:00
|
|
|
import handleUserTyping from './handlers/userTyping';
|
2020-11-30 22:27:26 +08:00
|
|
|
import handleSyncGroupChatMsg from './handlers/syncGroupsChat';
|
2019-03-16 02:37:56 +08:00
|
|
|
import { processForHTML5ServerOnly } from '/imports/api/common/server/helpers';
|
2018-03-10 02:42:14 +08:00
|
|
|
|
2020-11-30 22:27:26 +08:00
|
|
|
RedisPubSub.on('GetGroupChatMsgsRespMsg', processForHTML5ServerOnly(handleSyncGroupChatMsg));
|
2018-03-10 02:42:14 +08:00
|
|
|
RedisPubSub.on('GroupChatMessageBroadcastEvtMsg', handleGroupChatMsgBroadcast);
|
2018-08-03 01:23:20 +08:00
|
|
|
RedisPubSub.on('ClearPublicChatHistoryEvtMsg', handleClearPublicGroupChat);
|
2020-11-30 22:27:26 +08:00
|
|
|
RedisPubSub.on('SyncGetGroupChatMsgsRespMsg', handleSyncGroupChatMsg);
|
2019-07-31 10:37:50 +08:00
|
|
|
RedisPubSub.on('UserTypingEvtMsg', handleUserTyping);
|