Skip to content

fix(telegram): align advertised media types with runtime support#883

Open
TZZheng wants to merge 1 commit into
Lingtai-AI:mainfrom
TZZheng:fix/issue-745-telegram-media-schema-telegrambot
Open

fix(telegram): align advertised media types with runtime support#883
TZZheng wants to merge 1 commit into
Lingtai-AI:mainfrom
TZZheng:fix/issue-745-telegram-media-schema-telegrambot

Conversation

@TZZheng

@TZZheng TZZheng commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove voice and audio from the Telegram send schema because the current runtime dispatch does not implement them reliably
  • keep the supported photo and document media types advertised
  • add contract tests that keep the public schema aligned with runtime validation and dispatch

Validation

  • PYTHONPATH=src python -m pytest -q tests/test_telegram_send_media_contract.py5 passed
  • git diff --check canonical/main...HEAD — passed
  • independent read-only review — PASS, no blockers

Risk

This intentionally narrows the advertised contract instead of adding unverified upload/transcoding behavior. Existing photo/document sends remain supported; voice/audio now fail at schema validation rather than later in dispatch.

Fixes #745

@TZZheng
TZZheng force-pushed the fix/issue-745-telegram-media-schema-telegrambot branch from 44917a8 to d451273 Compare July 12, 2026 22:41
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.

Telegram: send schema advertises media.type 'voice'/'audio' but _send rejects them at runtime

1 participant