umputun / tg-spam

Anti-Spam bot for Telegram and anti-spam library
https://tg-spam.umputun.dev
MIT License
224 stars 39 forks source link

retry plain text send if md fails #29

Closed umputun closed 11 months ago

umputun commented 11 months ago

On some messages forwarded to the admin chat or edited in this chat by the bot occasionally, we get errors on entity decoding. This is likely some incompatibility with the message text and enforced markdown mode. I have tried to sanitize all I can, but to prevent those errors, this PR adds failback to plain text if the markdown send call fails.