16 self::$statusHandler =
new StatusHandler();
17 \Bitrix\Replica\Client\HandlersManager::register(self::$statusHandler);
18 \Bitrix\Replica\Client\HandlersManager::register(
new ChatHandler());
19 \Bitrix\Replica\Client\HandlersManager::register(
new RelationHandler());
20 \Bitrix\Replica\Client\HandlersManager::register(
new MessageHandler());
21 \Bitrix\Replica\Client\HandlersManager::register(
new MessageParamHandler());
22 \Bitrix\Replica\Client\HandlersManager::register(
new StartWritingHandler());
24 $eventManager = \Bitrix\Main\EventManager::getInstance();
27 \Bitrix\Replica\Server\Event::registerOperation(
"im_status_update", array(self::$statusHandler,
"handleStatusUpdateOperation"));
29 $eventManager->addEventHandler(
"socialservices",
"OnAfterRegisterUserByNetwork", array(self::$statusHandler,
"OnStartUserReplication"),
false, 200);
30 \Bitrix\Replica\Server\Event::registerOperation(
"im_status_bind", array(self::$statusHandler,
"handleStatusBindOperation"));
32 $eventManager->addEventHandler(
"im",
"OnAfterRecentDelete", array(self::$statusHandler,
"OnAfterRecentDelete"));
33 \Bitrix\Replica\Server\Event::registerOperation(
"im_status_unbind", array(self::$statusHandler,
"handleStatusUnbindOperation"));
35 $eventManager->addEventHandler(
"im",
"OnAfterRecentAdd", array(self::$statusHandler,
"OnAfterRecentAdd"));
36 \Bitrix\Replica\Server\Event::registerOperation(
"im_status_rebind", array(self::$statusHandler,
"handleStatusRebindOperation"));