• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/rest.php
  • Класс: BitrixImOpenLinesRest
  • Вызов: Rest::operatorSpam
static function operatorSpam($arParams, $n, CRestServer $server)
{
	$arParams = array_change_key_case($arParams, CASE_UPPER);

	$control = new Operator($arParams['CHAT_ID']);
	$result = $control->markSpam();
	if (!$result)
	{
		throw new RestException($control->getError()->msg, $control->getError()->code, CRestServer::STATUS_WRONG_REQUEST);
	}

	return true;
}