• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat/GroupChat.php
  • Класс: BitrixImV2ChatGroupChat
  • Вызов: GroupChat::sendDescriptionMessage
protected function sendDescriptionMessage(?int $authorId = null): void
{
	if (!$this->getDescription())
	{
		return;
	}

	if (!$authorId)
	{
		$authorId = $this->getAuthorId();
	}
	$author = BitrixImV2EntityUserUser::getInstance($authorId);

	CIMMessage::Add([
		'MESSAGE_TYPE' => self::IM_TYPE_CHAT,
		'TO_CHAT_ID' => $this->getChatId(),
		'FROM_USER_ID' => $author->getId(),
		'MESSAGE' => htmlspecialcharsback($this->getDescription()),
	]);
}