• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/operator.php
  • Класс: BitrixImOpenLinesOperator
  • Вызов: Operator::closeDialogOtherOperator
public function closeDialogOtherOperator()
{
	$result = new Result();

	$access = $this->checkAccess();
	if ($access['RESULT'])
	{
		$chat = new Chat($this->chatId);
		$resultFinishChat = $chat->finish($this->userId, true);

		if(!$resultFinishChat->isSuccess())
		{
			$result->addErrors($resultFinishChat->getErrors());
		}
	}
	else
	{
		$result->addError(new Error($this->getError()->msg, $this->getError()->code, __METHOD__, ['USER_ID' => $this->userId, 'CHAT_ID' => $this->chatId]));
	}

	return $result;
}