feat: expose birthday in get_full_user - #131
Merged
chigwell merged 1 commit intoMay 26, 2026
Merged
Conversation
Telethon's UserFull has a 'birthday' field for Premium users who set it and allow contacts to see it. Surface it from get_full_user so MCP consumers can read birthday data alongside other profile fields. Format: - ISO 8601 'YYYY-MM-DD' when year is present - vCard RFC 6350 style '--MM-DD' for year-less dates - None when birthday is unavailable or the user is not Premium / has not shared it
chigwell
approved these changes
May 26, 2026
KiaroSama
pushed a commit
to KiaroSama/telegram-mcp
that referenced
this pull request
Aug 25, 2026
…in-get-full-user feat: expose birthday in get_full_user
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
Surfaces
birthdayfromUserFullin theget_full_usertool output.Why
Telethon's
UserFull.birthdayexposes the contact's date of birth when:The
yearcomponent is optional (often hidden by the user). Currentlyget_full_userdoes not expose this field, even though it sits right next to fields the tool already surfaces (bio,personal_channel,verified,premium,common_chats_count).How
Adds 18 lines inside
get_full_user(telegram_mcp/tools/profile.py):full_user.birthdayviagetattr(forward-compatible if Telethon ever omits the attribute),YYYY-MM-DDwhen the year is present,--MM-DDfor year-less dates,Nonewhen birthday is unavailable.The new field is placed next to
personal_channelin the result dict, keeping the order logical.Testing
PYTHONPATH=. uv run pytest -q --ignore=tests/test_media_album.py→ 99/99 passed on this branch.tests/test_media_album.pyshows 6 pre-existing failures onorigin/main(verified by stashing the patch and re-running on a clean checkout) — they are infra-related (Error: 'account' is required) and unrelated to this change.birthdayfield in the tool output.Notes
Follows the same minimal-patch style as #128 (
fix: handle MessageReplyStoryHeader without reply_to_msg_id attribute).