• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/widget/formhandler.php
  • Класс: BitrixImOpenLinesWidgetFormHandler
  • Вызов: FormHandler::loadSession
private function loadSession(): bool
{
	if ($this->isWelcomeForm && !$this->messageId)
	{
		return false;
	}

	$this->session = new Session();
	if ($this->chat instanceof Chat)
	{
		$this->session->setChat($this->chat);
	}
	$this->sessionStarted = $this->session->load([
		'USER_CODE' => $this->chat->getData('ENTITY_ID'),
		'SKIP_CREATE' => 'Y'
	]);

	if (
		!($this->chat instanceof Chat)
		&& ($this->session->getChat() instanceof Chat)
	)
	{
		$this->chat = $this->session->getChat();
	}

	return true;
}