• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/controller/call.php
  • Класс: BitrixImControllerCall
  • Вызов: Call::negotiationNeededAction
public function negotiationNeededAction($callId, $userId, $restart = false)
{
	$restart = (bool)$restart;
	$currentUserId = $this->getCurrentUser()->getId();
	$call = Registry::getCallWithId($callId);
	if (!$call)
	{
		$this->addError(new Error(Loc::getMessage("IM_REST_CALL_ERROR_CALL_NOT_FOUND"), "call_not_found"));
		return null;
	}

	if(!$this->checkCallAccess($call, $currentUserId))
		return null;

	$callUser = $call->getUser($currentUserId);
	if($callUser)
	{
		$callUser->updateLastSeen(new DateTime());
	}

	$call->getSignaling()->sendNegotiationNeeded($currentUserId, $userId, $restart);
	return true;
}