-
Notifications
You must be signed in to change notification settings - Fork 33.9k
[Bug]: Telegram incoming image files treated as document uploads #18620
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliveryduplicateThis issue or pull request already existsThis issue or pull request already existsplatform/telegramTelegram bot adapterTelegram bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current mainSweeper: behavior already present on current maintype/bugSomething isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliveryduplicateThis issue or pull request already existsThis issue or pull request already existsplatform/telegramTelegram bot adapterTelegram bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current mainSweeper: behavior already present on current maintype/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Description
On Telegram, Hermes handles normal photo uploads, but rejects image files sent as Telegram documents (for example a PNG sent "without compression") as unsupported documents.
This means the same visual content works when sent through Telegram's photo path, but fails when sent through Telegram's document path.
Steps to Reproduce
Expected Behavior
If an inbound Telegram document is actually an image (
.png,.jpg,.jpeg,.webp, or broadlyimage/*), Hermes should route it through the same image intake path used for normal Telegram photos.At minimum, image documents should not be rejected as unsupported generic documents.
Actual Behavior
Hermes responds with:
The image never reaches the image/vision path.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Operating System
Debian 12
Python Version
3.11.14
Hermes Version
0.12.0
Additional Logs / Traceback (optional)
Successful photo path: [Telegram] Cached user photo at /home/laydros/.hermes/image_cache/img_65260e8b663d.jpg [Telegram] Flushing photo batch agent:main:telegram:dm:701334181:photo-burst with 1 image(s) Image routing: text (mode=text). Pre-analyzing 1 image(s) via vision_analyze. Failing document path: [Telegram] Unsupported document type: .png inbound message: platform=telegram user=laydros chat=701334181 msg="Unsupported document type '.png'. Supported types: .cfg, .csv, .docx, .ini, .jso"Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?