feat(contacts): favorite aliases resolved everywhere; fix session generator 2FA retry and non-interactive stdin - #173
Merged
chigwell merged 1 commit intoJul 30, 2026
Conversation
…nteractive stdin - Add favorite contact aliases stored in aliases.json: set_contact_alias, list_contact_aliases, delete_contact_alias tools. Aliases are resolved in resolve_entity/resolve_input_entity, so every tool accepting a chat_id understands them; search_contacts returns matching favorites first. - QR login: retry the 2FA password prompt on PasswordHashInvalidError instead of crashing and forcing a re-scan. - Session generator: handle EOF on the label and .env-update prompts so piped/scripted runs don't traceback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
chigwell
approved these changes
Jul 30, 2026
KiaroSama
pushed a commit
to KiaroSama/telegram-mcp
that referenced
this pull request
Aug 25, 2026
…-qr-fixes feat(contacts): favorite aliases resolved everywhere; fix session generator 2FA retry and non-interactive stdin
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.
What
Favorite contact aliases
set_contact_alias,list_contact_aliases,delete_contact_alias.aliases.json(gitignored), case-insensitive, leading@ignored.resolve_entity/resolve_input_entity, so every tool that accepts achat_idunderstands an alias — send, forward, media, admin ops, etc. Example: save "andrew" once, thensend_message("andrew", ...)just works.search_contactsreturns matching favorites at the top, so MCP clients pick the intended person deterministically instead of guessing between similarly-named contacts.Session string generator fixes (hit these in real use)
PasswordHashInvalidErrorand crashed the generator, forcing a full re-scan. Now it re-prompts until the password is correct.input()for the account label and the .env-update prompt raisedEOFErrorand tracebacked. Now label defaults to empty and the .env prompt defaults to No.Tests
tests/test_aliases.py: alias apply/passthrough, corrupt/missing file, roundtrip.tests/test_session_string_generator.py: new test for 2FA retry on invalid password.black .clean,flake8critical checks clean, 67 tests pass locally.🤖 Generated with Claude Code