• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message.php
  • Класс: BitrixImV2Message
  • Вызов: Message::getChat
public function getChat(): Chat
{
	if (!$this->chat)
	{
		if ($this->getChatId())
		{
			$this->chat = Chat::getInstance($this->getChatId());
		}
		if ($this->chat)
		{
			$this->setRegistry($this->chat->getMessageRegistry());
		}
		else
		{
			return new ImV2ChatNullChat();
		}
	}

	return $this->chat;
}