mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-31 07:27:13 +00:00
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:
@@ -775,7 +775,7 @@
|
||||
"renew": "Perpanjangan otomatis",
|
||||
"renewDesc": "Perpanjangan otomatis setelah kedaluwarsa. (0 = nonaktif) (satuan: hari)",
|
||||
"renewDays": "Perpanjangan otomatis (hari)",
|
||||
"searchPlaceholder": "Cari email, komentar, sub ID, UUID, kata sandi, auth…",
|
||||
"searchPlaceholder": "Cari email, komentar, sub ID, UUID, kata sandi, auth, Telegram ID…",
|
||||
"filterTitle": "Filter klien",
|
||||
"clearAllFilters": "Hapus semua",
|
||||
"filters": {
|
||||
|
||||
Reference in New Issue
Block a user