Skip to content

fix: accept Telegram image documents#19446

Closed
MarkIanRubin wants to merge 1 commit into
NousResearch:mainfrom
MarkIanRubin:fix/telegram-image-documents
Closed

fix: accept Telegram image documents#19446
MarkIanRubin wants to merge 1 commit into
NousResearch:mainfrom
MarkIanRubin:fix/telegram-image-documents

Conversation

@MarkIanRubin

Copy link
Copy Markdown

Summary

  • treats Telegram document uploads with image extensions/MIME types as photos for agent processing
  • supports .jpg, .jpeg, .png, .webp, .gif, and .bmp when they arrive through Telegram's document path
  • keeps normal document validation for non-image files

Test Plan

  • python -m pytest tests/gateway/test_telegram_documents.py -q -o 'addopts='
  • git diff --check
  • python -m py_compile gateway/platforms/telegram.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter labels May 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #19023 and #16710 — same fix routing Telegram image documents through the photo handler.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #19023 and #16710.

@teknium1

teknium1 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Closing as duplicate of #19023, which was merged via #21173. The two PRs fixed the same bug (Telegram rejecting .png documents). mrcoferland's approach batched via _photo_batch_key to match the existing photo path and landed first. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants