• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/ReadService.php
  • Класс: BitrixImV2MessageReadService
  • Вызов: ReadService::onAfterNotificationSend
public function onAfterNotificationSend(Message $message, Relation $relation): Result
{
	$relationCollection = new RelationCollection();
	$relationCollection->add($relation);
	$this->counterService->addForEachUser($message, $relationCollection);

	$counter = $this->counterService->getByChat($relation->getChatId());

	$time = microtime(true);
	$this->sendPush($relation->getChatId(), [$this->getContext()->getUserId()], $counter, $time);

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