Метод totalsMayBeTruncated

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу строки 195–207
~/bitrix/modulesim/lib/V2/Integration/AiAssistant/Tools/GetUnreadCountersTool.php

Исходный код

PHP
private

Сигнатура метода

private function totalsMayBeTruncated(UserCounters $userCounters, int $chatsLimit): bool

Возвращает: bool

Описание

The collector caps the per-chat message counters at getChatsLimit() most recently active chats, so for a user with unread messages in more chats the summary totals undercount (same cap as the messenger UI counters). Once the cap is visibly reached, the truncation is reported to the caller. The notification (system) chat competes for a slot of the capped selection but is routed to notificationCounter instead of the iterable chat counters, so it is accounted for separately. Best-effort: entries dropped after the capped selection (e.g. stale non-member residue) may hide an exactly-at-cap state, and an exactly-at-cap state without truncation still raises the flag.

Параметры

2
Имя Тип По умолчанию Флаги
$userCounters UserCounters -
-
$chatsLimit int -
-