fix: rich messages follow-ups — reply_parameters, send latch, opt-in default

- Use reply_parameters per the sendRichMessage spec instead of the
  undocumented reply_to_message_id scalar (silently ignored -> reply
  anchor quietly dropped).
- Latch rich sends off after an endpoint-capability failure (old PTB /
  server without sendRichMessage) so every later reply doesn't pay a
  doomed extra roundtrip; per-message BadRequests do NOT latch.
- Default rich_messages to OFF (opt-in) while the day-old Bot API 10.1
  endpoint is validated live; revert the prompt-hint table guidance
  until the default flips on.
- Tests: reply_parameters shape, send-latch behavior, BadRequest
  non-latch; rich tests opt in explicitly via extra.
This commit is contained in:
Teknium 2026-06-12 03:13:15 -07:00
parent 05b9c84ca4
commit 652dd9c9f2
7 changed files with 107 additions and 52 deletions

View file

@ -721,8 +721,9 @@ platform_toolsets:
# disable_link_previews: false # Set true to suppress Telegram URL previews in bot messages
# # Bot API 10.1 Rich Messages: final replies send raw markdown via
# # sendRichMessage so tables, task lists, collapsible details, math, etc.
# # render natively (with automatic MarkdownV2 fallback). Default true.
# rich_messages: true # Set false to force the legacy MarkdownV2 path
# # render natively (with automatic MarkdownV2 fallback). Opt-in while
# # the new endpoint is validated; default false.
# rich_messages: false # Set true to enable native rich rendering
#
# Discord-specific settings (config.yaml top-level, not under platforms:):
#