• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/livechatclient.php
  • Класс: BitrixImOpenLinesLiveChatClient
  • Вызов: LiveChatClient::__construct
public function __construct($chatId, $userId)
{
	$imLoad = BitrixMainLoader::includeModule('im');
	$pullLoad = BitrixMainLoader::includeModule('pull');
	if ($imLoad && $pullLoad)
	{
		$this->error = new Error(null, '', '');
		$this->moduleLoad = true;
	}
	else
	{
		if (!$imLoad)
		{
			$this->error = new Error(__METHOD__, 'IM_LOAD_ERROR', Loc::getMessage('IMOL_LCC_ERROR_IM_LOAD'));
		}
		elseif (!$pullLoad)
		{
			$this->error = new Error(__METHOD__, 'IM_LOAD_ERROR', Loc::getMessage('IMOL_LCC_ERROR_PULL_LOAD'));
		}
	}

	$this->chatId = intval($chatId);
	$this->userId = intval($userId);
}