Bug Description
Commit 9d225fbf4 (fix(telegram): auto-rich pipe tables and topic routing for sendRichMessage) added _content_is_pipe_table_primary() which forces pipe-table content through sendRichMessage even when rich_messages: false is configured.
This reintroduces the "This message is not supported on your version of Telegram" error on clients that don't support Bot API 10.1 rich messages (AyuGram, Telegram Web, some desktop clients).
Root Cause
_rich_delivery_enabled() was changed to:
def _rich_delivery_enabled(self, content: str) -> bool:
return bool(
getattr(self, "_rich_messages_enabled", True)
or self._content_is_pipe_table_primary(content) # ← bypasses config
)
The or clause means pipe tables always go through sendRichMessage regardless of the rich_messages opt-in setting.
Expected Behavior
When platforms.telegram.extra.rich_messages: false is set, no content should be sent via sendRichMessage — including pipe tables. The legacy MarkdownV2 path should be used for all content.
Actual Behavior
Pipe tables are auto-routed to sendRichMessage even with rich_messages: false, breaking delivery on AyuGram and Telegram Web.
Fix
Remove the or self._content_is_pipe_table_primary(content) bypass from _rich_delivery_enabled() so the config flag is fully respected.
def _rich_delivery_enabled(self, content: str) -> bool:
return bool(
getattr(self, "_rich_messages_enabled", True)
)
Related
Bug Description
Commit
9d225fbf4(fix(telegram): auto-rich pipe tables and topic routing for sendRichMessage) added_content_is_pipe_table_primary()which forces pipe-table content throughsendRichMessageeven whenrich_messages: falseis configured.This reintroduces the "This message is not supported on your version of Telegram" error on clients that don't support Bot API 10.1 rich messages (AyuGram, Telegram Web, some desktop clients).
Root Cause
_rich_delivery_enabled()was changed to:The
orclause means pipe tables always go throughsendRichMessageregardless of therich_messagesopt-in setting.Expected Behavior
When
platforms.telegram.extra.rich_messages: falseis set, no content should be sent viasendRichMessage— including pipe tables. The legacy MarkdownV2 path should be used for all content.Actual Behavior
Pipe tables are auto-routed to
sendRichMessageeven withrich_messages: false, breaking delivery on AyuGram and Telegram Web.Fix
Remove the
or self._content_is_pipe_table_primary(content)bypass from_rich_delivery_enabled()so the config flag is fully respected.Related
9d225fbf4which landed after fix(telegram): make Bot API 10.1 rich messages opt-in (default off) (#48422) #50322 (the opt-in fix)