Add direct QR option to session string generator - #134
Merged
Conversation
Allow operators to choose QR login directly with a --qr flag instead of navigating the interactive login-method prompt. Keep the existing prompt as the default for backwards compatibility, and add --phone for symmetric explicit selection. Constraint: Upstream already has QR login support; the missing piece is a non-interactive CLI selector for operational runbooks. Rejected: Adding a separate QR generator script | duplicates existing session generator logic and increases maintenance surface. Confidence: high Scope-risk: narrow Directive: Keep session strings private; do not log generated session strings in automated wrappers. Tested: uv run black --check session_string_generator.py tests/test_session_string_generator.py; uv run pytest tests/test_session_string_generator.py -q; uv run pytest -q Not-tested: Real Telegram QR authorization, because it requires live account interaction.
chigwell
approved these changes
May 26, 2026
chigwell
pushed a commit
that referenced
this pull request
May 26, 2026
Document the direct QR and phone-code flags for session string generation so operational runbooks can avoid the interactive method selector while preserving the default prompt for manual use. Constraint: Documentation follows the implementation proposed in PR #134. Rejected: Duplicating the full QR login walkthrough | the README already explains session generation and troubleshooting; this PR only needs flag-level usage. Confidence: high Scope-risk: narrow Directive: Keep this docs PR separate from the implementation PR. Tested: git diff --check; grep verified README mentions --qr and --phone in quick start and troubleshooting. Not-tested: Rendering on GitHub beyond Markdown syntax.
KiaroSama
pushed a commit
to KiaroSama/telegram-mcp
that referenced
this pull request
Aug 25, 2026
Add direct QR option to session string generator
KiaroSama
pushed a commit
to KiaroSama/telegram-mcp
that referenced
this pull request
Aug 25, 2026
Document the direct QR and phone-code flags for session string generation so operational runbooks can avoid the interactive method selector while preserving the default prompt for manual use. Constraint: Documentation follows the implementation proposed in PR chigwell#134. Rejected: Duplicating the full QR login walkthrough | the README already explains session generation and troubleshooting; this PR only needs flag-level usage. Confidence: high Scope-risk: narrow Directive: Keep this docs PR separate from the implementation PR. Tested: git diff --check; grep verified README mentions --qr and --phone in quick start and troubleshooting. Not-tested: Rendering on GitHub beyond Markdown syntax.
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.
Summary
--qrtosession_string_generator.pyso QR login can be selected directly from scripts/runbooks.--phoneas the explicit counterpart while preserving the existing interactive prompt when no flag is provided.--qr,--phone, no flags, and conflicting flags.Test Plan
uv run black --check session_string_generator.py tests/test_session_string_generator.pyuv run pytest tests/test_session_string_generator.py -quv run pytest -qReview Notes
109 passed, 1 warning.omx exec '$code-review', but local Codex auth is not configured (401 Unauthorized;omx auth listreports no auth slots). A fallback independent review found no security or logic blockers and suggested the no-flags parser test, which is included here.