1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
SendChatMessageHandler.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Collab\Converter\Handler;
6
7use Bitrix\Main\Result;
8use Bitrix\Socialnetwork\Collab\Converter\Command\AbstractConverterCommand;
9use Bitrix\Socialnetwork\Collab\Integration\IM\ActionMessageFactory;
10use Bitrix\Socialnetwork\Collab\Integration\IM\ActionType;
11
13{
14 public function __construct(private readonly ActionType $actionType)
15 {
16 }
17
18 public function execute(AbstractConverterCommand $command): Result
19 {
20 $group = $command->getGroup();
21
22 ActionMessageFactory::getInstance()
23 ->getActionMessage($this->actionType, $group->getId(), $command->getInitiatorId())
24 ->send()
25 ;
26
27 return new Result();
28 }
29}
__construct(private readonly ActionType $actionType)
Определения SendChatMessageHandler.php:14