]> git.giacomolli.uk - onechat/commitdiff
Call sendRichMessage of the Bot API
authorAnderson A. Giacomolli <redacted>
Sat, 7 Nov 2026 15:18:08 +0000 (12:18 -0300)
committerAnderson A. Giacomolli <redacted>
Sat, 7 Nov 2026 15:18:08 +0000 (12:18 -0300)
The Bot API client sends Markdown as a rich message with
sendRichMessage, which Telegram renders itself, tables included. The
call has the same send timeout as sendMessage, so a stalled connection
fails with a network error that the sender can try again.

A botError now tells if the answer is a Bot API answer with ok false,
and rejected tells if such an answer has HTTP 400 or 404. Then the call
did nothing, so the sender can send the same content another way with no
risk to repeat it. An error page of a proxy with HTTP 404 is not a Bot
API answer, so it is not a refusal.

Issue: fec23f9


No differences found