• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/ReadService.php
  • Класс: BitrixImV2MessageReadService
  • Вызов: ReadService::unreadNotifications
public function unreadNotifications(MessageCollection $messages, Relation $relation): Result
{
	$this->counterService->addCollection($messages, $relation);
	$counter = $this->counterService->getByChat($relation->getChatId());
	$time = microtime(true);
	//$this->viewedController->deleteByMessageIds($messages->getIds(), $relation->getChatId());
	$this->sendPush($relation->getChatId(), [$this->getContext()->getUserId()], $counter, $time);

	return (new Result())->setResult(['COUNTER' => $counter]);
}