Skip to content

feat(chats): report avatar presence (has_photo) in get_chat - #191

Merged
chigwell merged 1 commit into
chigwell:mainfrom
panevesht:feat/get-chat-has-photo
Aug 13, 2026
Merged

feat(chats): report avatar presence (has_photo) in get_chat#191
chigwell merged 1 commit into
chigwell:mainfrom
panevesht:feat/get-chat-has-photo

Conversation

@panevesht

Copy link
Copy Markdown
Contributor

Summary

  • get_chat now includes a boolean has_photo field so callers can detect chats/users that have no avatar set, without having to attempt a media download.
  • The entity already carries this information (ChatPhoto/ChatPhotoEmpty for chats and channels, UserProfilePhoto/UserProfilePhotoEmpty for users); this just surfaces it in the record.

Test plan

  • Added a parametrized test in tests/test_get_chat.py covering: a real photo object → true; ChatPhotoEmptyfalse; UserProfilePhotoEmptyfalse; no photo → false.
  • Full suite passes (279 tests), black --check clean.

🤖 Generated with Claude Code

The entity carries ChatPhoto/ChatPhotoEmpty (chats/channels) or
UserProfilePhoto/UserProfilePhotoEmpty (users); surface a boolean so
callers can detect chats that have no avatar set without downloading
media.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chigwell
chigwell merged commit d4c2d11 into chigwell:main Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants