• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/ReadService.php
  • Класс: BitrixImV2MessageReadService
  • Вызов: ReadService::getChatMessageStatus
public function getChatMessageStatus(int $chatId): string
{
	$lastMessageId = $this->getLastMessageIdInChat($chatId);

	if ($lastMessageId === 0)
	{
		return IM_MESSAGE_STATUS_RECEIVED;
	}

	return $this->viewedService->getMessageStatus($lastMessageId);
}