1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
InputActionNotify.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Pull\Event;
4
5use Bitrix\Im\V2\Chat;
6use Bitrix\Im\V2\Chat\InputAction\Type;
7use Bitrix\Im\V2\Common\ContextCustomer;
8use Bitrix\Im\V2\Pull\EventType;
9
11{
12 use ContextCustomer;
13 use DialogIdFiller;
14
15 protected ?string $customUserName = null;
16 protected Type $actionType;
17 protected int $expiry = 60;
18
20 {
21 parent::__construct($chat);
22 $this->actionType = $actionType;
23 }
24
25 protected function getType(): EventType
26 {
27 return EventType::InputActionNotify;
28 }
29
30 public function setCustomUserName(?string $customUserName): self
31 {
33 {
34 $this->customUserName = $customUserName;
35 }
36
37 return $this;
38 }
39
40 protected function getBasePullParamsInternal(): array
41 {
42 return [
43 'dialogId' => $this->getBaseDialogId(),
44 'userId' => $this->getContext()->getUserId(),
45 'userName' => $this->customUserName ?? $this->getContext()->getUser()->getName(),
46 'userFirstName' => $this->customUserName ?? $this->getContext()->getUser()->getFirstName(),
47 'type' => $this->actionType->value,
48 ];
49 }
50
51 protected function getSkippedUserIds(): array
52 {
53 return [$this->getContext()->getUserId()];
54 }
55}
__construct(Chat $chat, Type $actionType)
Определения InputActionNotify.php:19
setCustomUserName(?string $customUserName)
Определения InputActionNotify.php:30
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
EventType
Определения EventType.php:6
Определения collection.php:2