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

	$access = $this->checkAccess();
	if ($access['RESULT'])
	{
		$chat = new Chat($this->chatId);
		$resultSetPinMode = $chat->setPauseFlag([
			'ACTIVE' => $active === true? 'Y': 'N',
			'USER_ID' => $this->userId
		]);

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

	return $result;
}