• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/ReadService.php
  • Класс: BitrixImV2MessageReadService
  • Вызов: ReadService::unreadTo
public function unreadTo(Message $message): Result
{
	//$this->setLastIdForUnread($message->getMessageId(), $message->getChatId());
	$relation = $message->getChat()->withContext($this->context)->getSelfRelation();
	if ($relation === null)
	{
		return new Result();
	}
	$this->counterService->addStartingFrom($message->getMessageId(), $relation);
	$this->viewedService->deleteStartingFrom($message);

	return new Result();
}