• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/secretary.php
  • Класс: BitrixIntranetSecretary
  • Вызов: Secretary::getChatIdIfExists
static function getChatIdIfExists(int $entityId, string $entityType): ?int
{
	if (!self::checkAccessForIm())
	{
		throw new BitrixMainSystemException('update chat: failed to load modules');
	}

	$chat = new CIMChat(0);
	if ($chatId = $chat->getEntityChat($entityType, $entityId))
	{
		return $chatId;
	}

	return null;
}