Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions telegram_mcp/tools/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,14 @@ async def list_messages(
"date": msg.date,
"text": sanitize_user_content(msg.message),
}
# Upstream bug: this hand-built record never called get_media_label,
# so a voice/photo/etc. with no caption was indistinguishable from
# an actually-empty message. message_to_dict (used by get_history)
# already gets this right.
media_label = get_media_label(msg)
if media_label:
record["media"] = media_label

grouped_id = getattr(msg, "grouped_id", None)
if grouped_id is not None:
record["grouped_id"] = grouped_id
Expand Down
Loading