Repository navigation
fix: restore global Telegram bot confirmation actions - #160
Merged
SamNet-dev merged 2 commits intoOct 28, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The bot shows "Restart the proxy?" but pressing Yes does not run the command.
_cb_render_confirmclears the target before constructing the keyboard, producingc:restart:. The strict callback decoder rejects the empty field. Update and rotate-all have the same problem; Lockdown also loses itson/offargument. Cancel produces another invalid payload (u:s::0).Change
Preserve the callback target separately from the display label. Keep
_for targetless global actions and retainon/offfor Lockdown. Global Cancel returns to the Tools menu (g). The callback grammar and role checks remain unchanged.Add regression coverage that opens each real confirmation screen, extracts the emitted Yes payload, and passes it back through the dispatcher. Verify that prompting/cancelling executes nothing, confirmation calls the expected CLI command exactly once, and a reseller cannot execute it.
Document why traffic totals can be identical for 24h/7d/30d: cumulative counters and dated history samples are separate. A recent history cannot reconstruct past daily usage, and the default 7-day retention cannot provide a complete 30-day window.
Validation
CI on the final commit: https://github.com/rmtshnik/MTProxyMax/actions/runs/40659198452
Bash parsing, unit suites on five distributions, and systemd/OpenRC integration are checked by this workflow. ShellCheck may still be running when this PR is opened.
Traffic history retention
For a complete 30-day traffic window, configure:
TELEGRAM_HISTORY_RETENTION_DAYS='30'The default is 7 days. The 30-day selector alone does not increase retention. A full window also requires 30 days of collected samples: increasing retention does not restore already-pruned records or reconstruct dated usage from cumulative counters. This requirement is also documented in the README change included in this PR.