• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/ReadService.php
  • Класс: BitrixImV2MessageReadService
  • Вызов: ReadService::__construct
public function __construct(?int $userId = null)
{
	$this->counterService = new CounterService();
	$this->viewedService = new ViewedService();

	if (isset($userId))
	{
		$context = new Context();
		$context->setUser($userId);
		$this->setContext($context);
		$this->counterService->setContext($context);
		$this->viewedService->setContext($context);
	}
}