1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
GroupChat.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Chat;
4
5use Bitrix\Im\Notify;
6use Bitrix\Im\Color;
7use Bitrix\Im\V2\Analytics\ChatAnalytics;
8use Bitrix\Im\V2\Call\CallToken;
9use Bitrix\Im\V2\Chat;
10use Bitrix\Im\V2\Chat\Copilot\CopilotPopupItem;
11use Bitrix\Im\V2\Chat\Param\Params;
12use Bitrix\Im\V2\Entity\File\ChatAvatar;
13use Bitrix\Im\V2\Entity\User\User;
14use Bitrix\Im\V2\Entity\User\UserCollection;
15use Bitrix\Im\V2\Entity\User\UserPopupItem;
16use Bitrix\Im\V2\Entity\User\UserType;
17use Bitrix\Im\V2\Integration\AI\AIHelper;
18use Bitrix\Im\V2\Integration\AI\EngineManager;
19use Bitrix\Im\V2\Integration\AI\RoleManager;
20use Bitrix\Im\V2\Integration\HumanResources\Structure;
21use Bitrix\Im\V2\Logger;
22use Bitrix\Im\V2\Message;
23use Bitrix\Im\V2\Message\Send\PushService;
24use Bitrix\Im\V2\Message\Send\SendingConfig;
25use Bitrix\Im\V2\Relation;
26use Bitrix\Im\V2\Relation\AddUsersConfig;
27use Bitrix\Im\V2\Rest\PopupData;
28use Bitrix\Im\V2\Rest\PopupDataAggregatable;
29use Bitrix\Im\V2\Result;
30use Bitrix\Im\V2\Service\Context;
31use Bitrix\ImBot\Bot\Network;
32use Bitrix\ImBot\Bot\Support24;
33use Bitrix\ImBot\Bot\SupportBox;
34use Bitrix\Main\Loader;
35use Bitrix\Main\Localization\Loc;
36use Bitrix\Pull\Event;
37use Bitrix\Im\V2\Message\Delete\DisappearService;
38
39class GroupChat extends Chat implements PopupDataAggregatable
40{
41 protected function getDefaultType(): string
42 {
43 return self::IM_TYPE_CHAT;
44 }
45
46 public function setType(string $type): Chat
47 {
48 $this->type = $type;
49
50 return $this;
51 }
52
57 public function allowMention(): bool
58 {
59 return true;
60 }
61
62 protected function needToSendGreetingMessages(): bool
63 {
64 return !$this->getEntityType();
65 }
66
67 protected function checkAccessInternal(int $userId): Result
68 {
69 $result = new Result();
70
71 if ($this->getRelationByUserId($userId) === null)
72 {
74 }
75
76 return $result;
77 }
78
79 public function linkToStructureNodes(array $structureNodes): void
80 {
81 if (empty($structureNodes))
82 {
83 return;
84 }
85
86 (new Structure($this))->link($structureNodes);
87 }
88
89 public function unlinkStructureNodes(array $structureNodes): void
90 {
91 if (empty($structureNodes))
92 {
93 return;
94 }
95
96 (new Structure($this))->unlink($structureNodes);
97 }
98
99 public function add(array $params, ?Context $context = null): Result
100 {
101 $result = new Result;
102 $skipAddMessage = ($params['SKIP_ADD_MESSAGE'] ?? 'N') === 'Y';
103 $forceSendGreetingMessages = ($params['SEND_GREETING_MESSAGES'] ?? 'N') === 'Y';
104 $paramsResult = $this->prepareParams($params);
105 if ($paramsResult->isSuccess())
106 {
107 $params = $paramsResult->getResult();
108 }
109 else
110 {
111 return $result->addErrors($paramsResult->getErrors());
112 }
113
114 $chat = new static($params);
115 $chat->onBeforeAdd();
116 $chat->save();
117
118 if (!$chat->getChatId())
119 {
120 return $result->addError(new ChatError(ChatError::CREATION_ERROR));
121 }
122
123 $addedUsers = $usersToInvite = $chat->getUserIds() ?? [];
124 if ($chat->getAuthorId())
125 {
126 $addedUsers[$chat->getAuthorId()] = $chat->getAuthorId();
127 unset($usersToInvite[$chat->getAuthorId()]);
128 }
129 $addUsersConfig = new AddUsersConfig($params['MANAGERS'] ?? [], false);
130 $chat->addUsersToRelation($addedUsers, $addUsersConfig);
131 $needToSendGreetingMessages = !$skipAddMessage && ($chat->needToSendGreetingMessages() || $forceSendGreetingMessages);
132 if ($needToSendGreetingMessages)
133 {
134 $chat->sendGreetingMessage($this->getContext()->getUserId());
135 $chat->sendBanner($this->getContext()->getUserId());
136 }
137
138 if (!$skipAddMessage)
139 {
140 $chat->sendMessageUsersAdd($usersToInvite, $addUsersConfig);
141 }
142 $chat->linkToStructureNodes($params['STRUCTURE_NODES'] ?? []);
143 $chat->sendEventUsersAdd($addedUsers);
144
145 if (!$skipAddMessage)
146 {
147 $chat->sendDescriptionMessage();
148 }
149 $chat->addIndex();
150
151 $result->setResult([
152 'CHAT_ID' => $chat->getChatId(),
153 'CHAT' => $chat,
154 ]);
155
156 $chat->onAfterAdd();
157 $chat->onUserAddAfterChatAdd($usersToInvite);
158
159 return $result;
160 }
161
162 protected function onBeforeAdd(?Context $context = null): void
163 {
164 $userIds = $this->getUserIds() ?? [];
165 $containsExtranet = UserCollection::hasUserByType($userIds, UserType::EXTRANET);
166 $this->setExtranet($containsExtranet)->setContext($context);
167 if (UserCollection::hasUserByType($userIds, UserType::COLLABER))
168 {
169 $this->getChatParams()->addParamByName(Params::CONTAINS_COLLABER, true, false);
170 $this->getChatParams()->addParamByName(Params::CONTAINS_COLLABER, true, false);
171 }
172 if (AIHelper::containsCopilotBot($this->usersIds))
173 {
175 }
176
177 $this->setUserCount(count($userIds));
178 }
179
180 protected function onAfterAdd(?Context $context = null): void
181 {
183
184 self::cleanCache($this->getChatId());
185 $this->isFilledNonCachedData = false;
186 }
187
188 protected function onUserAddAfterChatAdd(array $addedUsers): void
189 {
190 $this->disableUserDeleteMessage();
191 }
192
193 protected function filterParams(array $params): array
194 {
195 if (
196 isset($params['MESSAGES_AUTO_DELETE_DELAY'])
197 && (int)$params['MESSAGES_AUTO_DELETE_DELAY'] !== 0
198 && !DisappearService::checkAvailability($this->getExtendedType(false))->isSuccess()
199 )
200 {
201 unset($params['MESSAGES_AUTO_DELETE_DELAY']);
202 }
203
204 return $params;
205 }
206
207 protected function validateAuthorId(int $authorId): Result
208 {
209 $result = new Result();
210 if ($authorId <= 0)
211 {
212 return $result->addError(
213 new ChatError(
215 'Using AUTHOR_ID = 0 is deprecated and will be disallowed soon. Please provide a valid user ID.'
216 )
217 );
218 }
219
220 if (!User::getInstance($authorId)->isExist())
221 {
222 return $result->addError(
223 new ChatError(
225 'The specified AUTHOR_ID does not match any existing user. Please provide a valid user ID.'
226 )
227 );
228 }
229
230 return $result;
231 }
232
233 protected function prepareParams(array $params = []): Result
234 {
235 $result = new Result();
236 $params = $this->filterParams($params);
237
238 $params['AUTHOR_ID'] = (int)($params['AUTHOR_ID'] ?? $this->getContext()->getUserId());
239 $validateAuthorIdResult = $this->validateAuthorId((int)$params['AUTHOR_ID']);
240 if (!$validateAuthorIdResult->isSuccess())
241 {
242 (new Logger('chat-creation-author-id-error'))->logErrors($validateAuthorIdResult->getErrorCollection());
243 }
244
245 $users = $params['USERS'] ?? [];
246 $managers = $params['MANAGERS'] ?? [];
247 $params['USERS'] = is_array($users) ? $users : [];
248 $params['MANAGERS'] = is_array($managers) ? $managers : [];
249 [$users, $structureNodes] = Structure::splitEntities($params['MEMBER_ENTITIES'] ?? []);
250
251 $params['MANAGERS'] = array_unique(array_merge($params['MANAGERS'], [$params['AUTHOR_ID']]));
252 $params['USERS'] = array_unique(array_merge($params['USERS'], $params['MANAGERS'], $users));
253 $params['STRUCTURE_NODES'] = $structureNodes;
254
255 if (
256 isset($params['AVATAR'])
257 && !is_numeric((string)$params['AVATAR'])
258 )
259 {
260 $params['AVATAR'] = ChatAvatar::saveAvatarByString($params['AVATAR']);
261 }
262
263 return $result->setResult($params);
264 }
265
266 protected function addUsersToRelation(array $usersToAdd, AddUsersConfig $config): void
267 {
269 $config = $config->setHideHistory($isHideHistory);
270 parent::addUsersToRelation($usersToAdd, $config);
271 }
272
273 public function addManagers(array $userIds, bool $sendPush = true): self
274 {
275 return $this->changeManagers($userIds, true, $sendPush);
276 }
277
278 public function deleteManagers(array $userIds, bool $sendPush = true): self
279 {
280 return $this->changeManagers($userIds, false, $sendPush);
281 }
282
283 protected function changeManagers(array $userIds, bool $isManager, bool $sendPush = true): self
284 {
285 $usersMap = [];
286 foreach ($userIds as $userId)
287 {
288 $usersMap[(int)$userId] = $isManager;
289 }
290
291 $this->changeManagersByMap($usersMap, $sendPush);
292
293 return $this;
294 }
295
301 public function changeManagersByMap(array $usersMap, bool $sendPush = true): self
302 {
303 $relations = $this->getRelations();
304
305 foreach ($usersMap as $userId => $isManager)
306 {
307 $relation = $relations->getByUserId($userId, $this->getChatId());
308 if ($relation === null)
309 {
310 continue;
311 }
312
313 $relation->setManager($isManager);
314
315 if ($this->chatId !== null)
316 {
317 (new ChatAnalytics($this))->addEditPermissions();
318 }
319 }
320
321 $relations->save(true);
322
323 if ($sendPush)
324 {
325 $this->sendPushManagersChange();
326 }
327
328 return $this;
329 }
330
331 protected function sendPushManagersChange(): void
332 {
333 $push = [
334 'module_id' => 'im',
335 'command' => 'chatManagers',
336 'params' => [
337 'dialogId' => $this->getDialogId(),
338 'chatId' => $this->getId(),
339 'list' => $this->getManagerList()
340 ],
342 ];
343 \Bitrix\Pull\Event::add($this->getRelations()->getUserIds(), $push);
344 }
345
350
351 public function checkTitle(): Result
352 {
353 if (!$this->getTitle())
354 {
355 $this->setTitle($this->generateTitle());
356 }
357
358 return new Result;
359 }
360
361 protected function generateTitle(): string
362 {
363 if (Color::isEnabled() && $this->getColor())
364 {
365 $colorCodeKey = 'im_chat_color_' . $this->getColor();
366 $colorCodeCount = \CGlobalCounter::GetValue($colorCodeKey, \CGlobalCounter::ALL_SITES);
367 if ($colorCodeCount >= Color::MAX_COLOR_COUNT)
368 {
369 $colorCodeCount = 0;
370 \CGlobalCounter::Set($colorCodeKey, 1, \CGlobalCounter::ALL_SITES, '', false);
371 }
372
373 $chatTitle = Loc::getMessage('IM_CHAT_NAME_FORMAT', [
374 '#COLOR#' => Color::getName($this->getColor()),
375 '#NUMBER#' => ++$colorCodeCount,
376 ]);
377 \CGlobalCounter::Set($colorCodeKey, $colorCodeCount, \CGlobalCounter::ALL_SITES, '', false);
378 }
379 else
380 {
381 $userIds = [];
382 if ($this->getUserIds() && count($this->getUserIds()))
383 {
384 $userIds = $this->getUserIds();
385 }
386 $userIds = \CIMContactList::PrepareUserIds($userIds);
387 $users = \CIMContactList::GetUserData([
388 'ID' => array_values($userIds),
389 'DEPARTMENT' => 'N',
390 'USE_CACHE' => 'N'
391 ]);
392
393 $usersNames = [];
394 foreach ($users['users'] as $user)
395 {
396 $usersNames[] = htmlspecialcharsback($user['name']);
397 }
398
399 $chatTitle = Loc::getMessage('IM_CHAT_NAME_FORMAT_USERS', [
400 '#USERS_NAMES#' => implode(', ', $usersNames),
401 ]);
402 }
403
404 return mb_substr($chatTitle, 0, 255);
405 }
406
408 {
409 $pushFormat = new Message\PushFormat($message);
410 $push = $pushFormat->formatMessageUpdate();
411 $push['params']['dialogId'] = $this->getDialogId();
412 if ($this->getType() === self::IM_TYPE_COMMENT)
413 {
414 \CPullWatch::AddToStack('IM_PUBLIC_COMMENT_' . $message->getChat()->getParentChatId(), $push);
415 }
416 else
417 {
418 Event::add($this->getUsersForPush(true, false), $push);
419 }
420 if ($this->needToSendPublicPull())
421 {
422 \CPullWatch::AddToStack('IM_PUBLIC_' . $message->getChatId(), $push);
423 }
424 if ($this->getType() === Chat::IM_TYPE_OPEN_CHANNEL && $message->getId() === $message->getChat()->getLastMessageId())
425 {
427 }
428 }
429
430 protected function sendGreetingMessage(?int $authorId = null)
431 {
432 if (!$authorId)
433 {
434 $authorId = $this->getAuthorId();
435 }
437
438 $replace = ['#USER_NAME#' => "[USER={$authorId}][/USER]"];
439 $messageText = Loc::getMessage($this->getCodeGreetingMessage($author), $replace);
440
441 if ($messageText)
442 {
444 'MESSAGE_TYPE' => $this->getType(),
445 'TO_CHAT_ID' => $this->getChatId(),
446 'FROM_USER_ID' => $author->getId(),
447 'MESSAGE' => $messageText,
448 'SYSTEM' => 'Y',
449 'PUSH' => 'N',
450 'SKIP_COUNTER_INCREMENTS' => 'Y',
451 'PARAMS' => [
452 'NOTIFY' => 'N',
453 ],
454 ]);
455 }
456
457 if ($authorId !== $this->getAuthorId())
458 {
459 $this->sendMessageAuthorChange($author);
460 }
461 }
462
463 protected function getCodeGreetingMessage(\Bitrix\Im\V2\Entity\User\User $author): string
464 {
465 return 'IM_CHAT_CREATE_' . $author->getGender();
466 }
467
468 protected function sendMessageAuthorChange(\Bitrix\Im\V2\Entity\User\User $author): void
469 {
470 $messageText = Loc::getMessage(
471 'IM_CHAT_APPOINT_OWNER_' . $author->getGender(),
472 [
473 '#USER_1_NAME#' => htmlspecialcharsback($author->getName()),
474 '#USER_2_NAME#' => htmlspecialcharsback($this->getAuthor()->getName())
475 ]
476 );
477
479 'MESSAGE_TYPE' => $this->getType(),
480 'TO_CHAT_ID' => $this->getChatId(),
481 'FROM_USER_ID' => $author->getId(),
482 'MESSAGE' => $messageText,
483 'SYSTEM' => 'Y',
484 'PUSH' => 'N'
485 ]);
486 }
487
488 protected function sendBanner(?int $authorId = null): void
489 {
490 if (!$authorId)
491 {
492 $authorId = $this->getAuthorId();
493 }
495
496 if (
497 in_array($this->getType(), [self::IM_TYPE_CHAT, self::IM_TYPE_OPEN, self::IM_TYPE_COPILOT], true)
498 && empty($this->getEntityType())
499 )
500 {
502 'MESSAGE_TYPE' => $this->getType(),
503 'TO_CHAT_ID' => $this->getChatId(),
504 'FROM_USER_ID' => $author->getId(),
505 'MESSAGE' => Loc::getMessage('IM_CHAT_CREATE_WELCOME_MSGVER_1'),
506 'SYSTEM' => 'Y',
507 'PUSH' => 'N',
508 'PARAMS' => [
509 'COMPONENT_ID' => 'ChatCreationMessage',
510 'NOTIFY' => 'N',
511 ],
512 'SKIP_COUNTER_INCREMENTS' => 'Y',
513 ]);
514 }
515 }
516
517 protected function sendInviteMessage(?int $authorId = null): void
518 {
519 if (!$authorId)
520 {
521 $authorId = $this->getAuthorId();
522 }
524
525 $userIds = array_unique($this->getUserIds());
526 if (count($userIds) < 2)
527 {
528 return;
529 }
530
531 $userIds = \CIMContactList::PrepareUserIds($userIds);
532 $users = \CIMContactList::GetUserData([
533 'ID' => array_values($userIds),
534 'DEPARTMENT' => 'N',
535 'USE_CACHE' => 'N'
536 ]);
537
538 if (!isset($users['users']) || count($users['users']) < 2)
539 {
540 return;
541 }
542
543 $usersNames = [];
544
545 if ($authorId !== $this->getAuthorId())
546 {
547 $usersNames[] = htmlspecialcharsback($this->getAuthor()->getName());
548 }
549
550 foreach ($users['users'] as $user)
551 {
552 if ($user['name'] !== $author->getName())
553 {
554 $usersNames[] = htmlspecialcharsback($user['name']);
555 }
556 }
557
558 $messageText = Loc::getMessage(
559 'IM_CHAT_JOIN_' . $author->getGender(),
560 [
561 '#USER_1_NAME#' => htmlspecialcharsback($author->getName()),
562 '#USER_2_NAME#' => implode(', ', array_unique($usersNames))
563 ]
564 );
565
567 'MESSAGE_TYPE' => $this->getType(),
568 'TO_CHAT_ID' => $this->getChatId(),
569 'FROM_USER_ID' => $author->getId(),
570 'MESSAGE' => $messageText,
571 'SYSTEM' => 'Y',
572 ]);
573 }
574
575 protected function prepareMessage(Message $message): void
576 {
577 parent::prepareMessage($message);
578
579 if (!$message->getAuthorId() && !$message->isSystem())
580 {
581 $message->setAuthorId($this->getContext()->getUserId());
582 }
583
584 if ($message->isSystem())
585 {
586 $message->setAuthorId(0);
587 }
588
589 $message->setNotifyModule('im')->setNotifyEvent(Notify::EVENT_GROUP);
590 }
591
592 public function getMultidialogData(): array
593 {
594 if (!Loader::includeModule('imbot'))
595 {
596 return [];
597 }
598
599 if ($this->getEntityType() !== Support24::CHAT_ENTITY_TYPE && $this->getEntityType() !== Network::CHAT_ENTITY_TYPE)
600 {
601 return [];
602 }
603
604 $userId = $this
605 ->getRelations()
606 ->filter(fn (Relation $relation) => !$relation->getUser()->isBot())
607 ->getAny()
608 ?->getUserId() ?? 0
609 ;
610
611 if ($this->getEntityType() === Support24::CHAT_ENTITY_TYPE)
612 {
613 if (Loader::includeModule('bitrix24') && Support24::isEnabled())
614 {
615 return Support24::getMultidialog($this->getId(), $this->getAuthorId(), $userId) ?? [];
616 }
617
618 return SupportBox::getMultidialog($this->getId(), $this->getAuthorId(), $userId) ?? [];
619 }
620
621 if ($this->getEntityType() === Network::CHAT_ENTITY_TYPE)
622 {
623 return Network::getMultidialog($this->getId(), $this->getAuthorId(), $userId) ?? [];
624 }
625
626 return [];
627 }
628
629 protected function sendDescriptionMessage(?int $authorId = null): void
630 {
631 if (!$this->getDescription())
632 {
633 return;
634 }
635
636 if (!$authorId)
637 {
638 $authorId = $this->getAuthorId();
639 }
640
642 'MESSAGE_TYPE' => $this->getType(),
643 'TO_CHAT_ID' => $this->getChatId(),
644 'FROM_USER_ID' => $authorId,
645 'MESSAGE' => htmlspecialcharsback($this->getDescription()),
646 ]);
647 }
648
649 public function containsCopilot(): bool
650 {
651 return (bool)$this->getChatParams()->get(Params::IS_COPILOT)?->getValue();
652 }
653
654 public function getCopilotRole(): ?string
655 {
656 if (
657 Loader::includeModule('imbot')
658 && $this->containsCopilot()
659 )
660 {
661 return (new RoleManager())->getMainRole($this->getChatId());
662 }
663
664 return null;
665 }
666
667 protected function fillCopilotBeforeChatAdd(?Context $context): void
668 {
669 $this->getChatParams()->addParamByName(Chat\Param\Params::IS_COPILOT, true, false);
670
671 $context ??= new Context();
672 $engineCode = (new EngineManager())->getLastSelectedEngineCode($context->getUserId());
673
674 if (isset($engineCode))
675 {
676 $this->setEngineCode($engineCode);
677 }
678 }
679
680 public function getEngineCode(): ?string
681 {
682 if (!$this->containsCopilot())
683 {
684 return null;
685 }
686
687 return $this->getChatParams()->get(Chat\Param\Params::COPILOT_ENGINE_CODE)?->getValue();
688 }
689
690 public function setEngineCode(?string $code): self
691 {
692 if (!isset($code))
693 {
694 return $this;
695 }
696
697 $engineManager = new EngineManager();
698 if (!$engineManager->validateEngineCode($code) || !$this->containsCopilot())
699 {
700 return $this;
701 }
702
703 $engineCode = (string)$this->getChatParams()->get(Chat\Param\Params::COPILOT_ENGINE_CODE)?->getValue();
704 if ($engineCode !== $code)
705 {
706 $this->getChatParams()->addParamByName(Chat\Param\Params::COPILOT_ENGINE_CODE, $code, false);
707 }
708
709 return $this;
710 }
711
712 public function getDefaultEngineCode(): ?string
713 {
714 return EngineManager::getDefaultEngineCode();
715 }
716
717 protected static function mirrorDataEntityFields(): array
718 {
719 $result = parent::mirrorDataEntityFields();
720
721 $result['ENGINE_CODE'] = [
722 'get' => 'getEngineCode',
723 'set' => 'setEngineCode',
724 'default' => 'getDefaultEngineCode',
725 'nullable' => true,
726 'skipSave' => true,
727 ];
728
729 return $result;
730 }
731
732 public function getPopupData(array $excludedList = []): PopupData
733 {
734 $userId = $this->getContext()->getUserId();
735
736 return parent::getPopupData($excludedList)
737 ->add(new UserPopupItem([$userId]))
738 ->add(CopilotPopupItem::getInstanceByChatIds([$this->getChatId()]))
739 ->add(new Chat\MessagesAutoDelete\MessagesAutoDeleteConfigs([$this->getChatId()]))
740 ->add(new CallToken($this->getId(), $userId))
741 ;
742 }
743
744 protected function needToSendMessageUserDelete(): bool
745 {
746 return true;
747 }
748}
$type
Определения options.php:106
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getType($chatData, bool $camelCase=true)
Определения chat.php:45
static getName($code)
Определения color.php:135
const MAX_COLOR_COUNT
Определения color.php:16
static isEnabled()
Определения color.php:50
static getPullExtra()
Определения common.php:127
const EVENT_GROUP
Определения notify.php:22
const CREATION_ERROR
Определения ChatError.php:23
const ACCESS_DENIED
Определения ChatError.php:19
const AUTHOR_ID_EMPTY
Определения ChatError.php:37
const AUTHOR_NOT_EXISTS
Определения ChatError.php:38
sendMessageAuthorChange(\Bitrix\Im\V2\Entity\User\User $author)
Определения GroupChat.php:468
needToSendGreetingMessages()
Определения GroupChat.php:62
onUserAddAfterChatAdd(array $addedUsers)
Определения GroupChat.php:188
checkAccessInternal(int $userId)
Определения GroupChat.php:67
prepareMessage(Message $message)
Определения GroupChat.php:575
deleteManagers(array $userIds, bool $sendPush=true)
Определения GroupChat.php:278
getDefaultType()
Определения GroupChat.php:41
sendPushUpdateMessage(Message $message)
Определения GroupChat.php:407
needToSendMessageUserDelete()
Определения GroupChat.php:744
add(array $params, ?Context $context=null)
Определения GroupChat.php:99
onAfterAdd(?Context $context=null)
Определения GroupChat.php:180
getPopupData(array $excludedList=[])
Определения GroupChat.php:732
setEngineCode(?string $code)
Определения GroupChat.php:690
validateAuthorId(int $authorId)
Определения GroupChat.php:207
sendBanner(?int $authorId=null)
Определения GroupChat.php:488
getPushService(Message $message, SendingConfig $config)
Определения GroupChat.php:346
getMultidialogData()
Определения GroupChat.php:592
onBeforeAdd(?Context $context=null)
Определения GroupChat.php:162
unlinkStructureNodes(array $structureNodes)
Определения GroupChat.php:89
changeManagers(array $userIds, bool $isManager, bool $sendPush=true)
Определения GroupChat.php:283
containsCopilot()
Определения GroupChat.php:649
sendPushManagersChange()
Определения GroupChat.php:331
prepareParams(array $params=[])
Определения GroupChat.php:233
getDefaultEngineCode()
Определения GroupChat.php:712
changeManagersByMap(array $usersMap, bool $sendPush=true)
Определения GroupChat.php:301
filterParams(array $params)
Определения GroupChat.php:193
sendDescriptionMessage(?int $authorId=null)
Определения GroupChat.php:629
sendGreetingMessage(?int $authorId=null)
Определения GroupChat.php:430
linkToStructureNodes(array $structureNodes)
Определения GroupChat.php:79
sendInviteMessage(?int $authorId=null)
Определения GroupChat.php:517
addUsersToRelation(array $usersToAdd, AddUsersConfig $config)
Определения GroupChat.php:266
addManagers(array $userIds, bool $sendPush=true)
Определения GroupChat.php:273
getCodeGreetingMessage(\Bitrix\Im\V2\Entity\User\User $author)
Определения GroupChat.php:463
fillCopilotBeforeChatAdd(?Context $context)
Определения GroupChat.php:667
static mirrorDataEntityFields()
Определения GroupChat.php:717
setType(string $type)
Определения GroupChat.php:46
static sendSharedPull(array $pull)
Определения OpenChannelChat.php:124
static saveAvatarByString(string $avatarBase64)
Определения ChatAvatar.php:143
static getInstance(?int $id)
Определения User.php:72
static sendMessageAfterChatAdd(Chat $chat)
Определения DisappearService.php:288
static getInstance()
Определения application.php:98
Определения result.php:20
static add($recipient, array $parameters, $channelType=\CPullChannel::TYPE_PRIVATE)
Определения event.php:22
static Add($arFields)
Определения im_message.php:28
const START_MESSAGE_LAST
Определения im_settings.php:21
static GetStartChatMessage()
Определения im_settings.php:539
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$context
Определения csv_new_setup.php:223
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
htmlspecialcharsback($str)
Определения tools.php:2693
Определения Uuid.php:3
Определения ActionUuid.php:3
Определения culture.php:9
Определения ufield.php:9
$user
Определения mysql_to_pgsql.php:33
$message
Определения payment.php:8
$config
Определения quickway.php:69
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799