fix(clients): include Telegram ID in client list search (#5888)

* fix(clients): include Telegram ID in client list search

clientMatchesSearch only checked Email/SubID/Comment/UUID/Password/Auth,
so searching the client list for a Telegram user ID never matched even
though the field is stored on every client.

This is a real regression, not a field that was simply never included:
before the paged search endpoint (#4500), the frontend searched with
ObjectUtil.deepSearch() over the full client object, which recursed into
every field including tgId. Replacing that with a fixed backend field
list silently dropped it (along with a few other fields, but tgId is the
one that's actually needed here since it's the panel's own way of
looking a client up when it only knows their Telegram ID).

TgID is int64 (0 = unset), so it can't sit in the existing []string
candidates array — matched separately via strconv, and skipped when 0 to
avoid a needle of "0" spuriously matching every client without a
Telegram ID.

Fixes #5880

* fix(clients): drop explanatory comment, mention Telegram ID in search hint

Addresses review feedback on #5888:
- Removed the // comment block above the TgID check in
  clientMatchesSearch per repo convention (code should read on its own).
- Updated searchPlaceholder in all 13 locale files to mention Telegram ID,
  since the search box now actually matches on it.

* test(clients): remove TgID search test per maintainer request
This commit is contained in:
mrnickson-hue
2026-07-10 13:20:35 +03:00
committed by GitHub
parent c62e8c6bbe
commit ed9686bf29
14 changed files with 16 additions and 13 deletions
+1 -1
View File
@@ -775,7 +775,7 @@
"renew": "Автопродление",
"renewDesc": "Автоматическое продление после окончания. (0 = отключено) (единица: день)",
"renewDays": "Автопродление (дней)",
"searchPlaceholder": "Поиск email, комментария, sub ID, UUID, пароля, auth…",
"searchPlaceholder": "Поиск email, комментария, sub ID, UUID, пароля, auth, Telegram ID…",
"filterTitle": "Фильтр клиентов",
"clearAllFilters": "Очистить все",
"filters": {