fix(messages): list_messages never calls get_media_label - #196
Merged
chigwell merged 1 commit intoAug 21, 2026
Merged
Conversation
record["text"] was built directly from msg.message without falling back to get_media_label(msg), so a voice message, photo, or any other captionless media item rendered identically to an actually-empty message. message_to_dict (used by get_history) already handled this correctly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
chigwell
approved these changes
Aug 21, 2026
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
list_messagesbuilds its own record dict directly frommsg.message, without theget_media_label(msg)fallback thatmessage_to_dict(used byget_history) already has.list_messagesoutput looking identical to an actually-empty message — nomediafield, no indication anything was attached.get_media_labelcallmessage_to_dictalready does, solist_messagesrecords get amediafield (e.g."media": "voice","media": "photo") whenever the message carries media, whether or not there's a caption.Test plan
Manually confirmed against a real chat with several voice/photo messages via a running server —
list_messagesnow reports"media": "voice"for a voice message that previously showed no media indicator at all.