• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat.php
  • Класс: BitrixImV2Chat
  • Вызов: Chat::setDialogId
public function setDialogId(string $dialogId): self
{
	$this->dialogId = $dialogId;

	if (BitrixImCommon::isChatId($dialogId))
	{
		$this->setChatId((int)BitrixImDialog::getChatId($dialogId));
		if (!$this->getType())
		{
			$this->setType(self::IM_TYPE_CHAT);
		}
	}
	else
	{
		if (!$this->getType())
		{
			$this->setType(self::IM_TYPE_PRIVATE);
		}
	}

	return $this;
}