• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message.php
  • Класс: BitrixImV2Message
  • Вызов: Message::mark
public function mark(): Result
{
	$result = new Result();

	$isSuccessMark = Recent::unread(
		$this->getChat()->getDialogId(),
		true,
		$this->getContext()->getUserId(),
		$this->getId()
	);

	if (!$isSuccessMark)
	{
		$result->addError(new ImV2MessageMessageError(ImV2MessageMessageError::MARK_FAILED));
	}

	return $result;
}