3x-ui/internal/web/service/tgbot
BlindMaster24 c7518c4038
fix(tgbot): send the admin traffic reports as one message (#6490)
Reset all traffics and the sorted usage report replied with one Telegram
message per client. A panel with a few hundred clients therefore fired a
burst of sendMessage calls that trips Telegram's per-chat rate limit and
throttles the bot for every user, not just the admin who tapped.

Both reports are now assembled into one string and handed to
SendMsgToTgbot, which already pages long messages.

Two details the batching would otherwise lose: the reset report still
answers (with the reply keyboard removed) when the panel has no clients,
and both reports are HTML-escaped as a whole, because a single stray "<" in
a remark or an email now costs the ~15-client page it lands on instead of
one client's message.
2026-09-13 12:52:55 +02:00
..
numeric_input.go refactor(tgbot): extract the shared numeric keypad builder 2026-09-10 21:07:57 +02:00
numeric_input_test.go test(tgbot): detect open-coded keypad transitions (#6214) 2026-08-15 15:27:02 +02:00
tgbot.go fix(tgbot): read the admin list and running flag under their mutex (#6491) 2026-09-13 11:46:36 +02:00
tgbot_admin_list_race_test.go fix(tgbot): read the admin list and running flag under their mutex (#6491) 2026-09-13 11:46:36 +02:00
tgbot_callback_auth_test.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tgbot_client.go fix(tgbot): render the add-client draft as HTML and escape its values (#6492) 2026-09-13 11:46:58 +02:00
tgbot_client_links_authz_test.go fix(tgbot): require client ownership for non-admin link callbacks (#6489) 2026-09-13 11:46:14 +02:00
tgbot_declined_callback_test.go fix(tgbot): answer the callbacks the bot cannot route (#6493) 2026-09-13 11:47:22 +02:00
tgbot_delete_after_test.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tgbot_draft_render_test.go fix(tgbot): render the add-client draft as HTML and escape its values (#6492) 2026-09-13 11:46:58 +02:00
tgbot_event.go feat(memory): add memory threshold alerts (#5366) 2026-06-21 17:45:33 +02:00
tgbot_inbound.go fix(tgbot): close stale-inbound TOCTOU and contain handler panics (#6442) 2026-09-10 09:41:52 +02:00
tgbot_report.go fix(tgbot): read the admin list and running flag under their mutex (#6491) 2026-09-13 11:46:36 +02:00
tgbot_report_batching_test.go fix(tgbot): send the admin traffic reports as one message (#6490) 2026-09-13 12:52:55 +02:00
tgbot_router.go fix(tgbot): send the admin traffic reports as one message (#6490) 2026-09-13 12:52:55 +02:00
tgbot_send.go fix(tgbot): read the admin list and running flag under their mutex (#6491) 2026-09-13 11:46:36 +02:00
tgbot_send_test.go fix(tgbot): use a token telego accepts in the edit-message tests 2026-09-06 17:32:01 +02:00
tgbot_stale_button_test.go fix(tgbot): guard the mock Telegram server's call counts 2026-09-13 12:01:56 +02:00
tgbot_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00