1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
spacelistsender.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Internals\EventService\Push;
4
5use Bitrix\Main\Loader;
6use Bitrix\Main\ModuleManager;
7use Bitrix\Socialnetwork\Integration\Pull\PushService;
8use Bitrix\Socialnetwork\Internals\EventService\Event;
9use Bitrix\Socialnetwork\Internals\EventService\EventDictionary;
10use Bitrix\Socialnetwork\Internals\EventService\Recepients\Recepient;
11
12final class SpaceListSender
13{
14 public const SUPPORTED_EVENTS = [
16 ];
17
18 public function send(Event $event, Recepient $recipient): void
19 {
21 {
22 return;
23 }
24
25 if (in_array($event->getType(), self::SUPPORTED_EVENTS) && $recipient->isOnline())
26 {
27 $recipients = [$recipient->getId()];
28
29 $userId = $event->getUserId();
30 $spaceId = $event->getGroupId();
31
32 PushService::addEvent($recipients, [
33 'module_id' => PushService::MODULE_NAME,
34 'command' => PushEventDictionary::getPushEventType($event->getType()),
35 'params' => [
36 'USER_ID' => $userId,
37 'GROUP_ID' => $spaceId,
38 ],
39 ]);
40 }
41 }
42}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static includeModule($moduleName)
Определения loader.php:67
static isModuleInstalled($moduleName)
Определения modulemanager.php:125
send(Event $event, Recepient $recipient)
Определения spacelistsender.php:18
$event
Определения prolog_after.php:141