-
Notifications
You must be signed in to change notification settings - Fork 493
Description
Version
4.23.0
Describe the bug
We use Azure Bot Services to connect our bot to Telegram. Everything was working fine for over a year, but several days ago (June 2, ~6AM UTC) simple Microsoft.SendActivity
begun failing when sending messages to Telegram with entity parsing errors. It seems that now it requires us to escape everything according to MarkdownV2
Telegram formatting rules.
To Reproduce
Steps to reproduce the behavior:
- Create new empty/blank bot in Azure Portal, add Telegram channel with some Telegram bot token, get AppId and AppPassword to connect to this bot from local instance;
- Create new bot in Bot Framework Composer (or from template)
- Add this action to Dialog json file to any place where bot response is expected:
{
"$kind": "Microsoft.SendActivity",
"activity": "Тest. Hello, World!"
},
- Talk with bot via Telegram and call this activity.
Bot will not send this message. Exception will be throw instead:
{"error":{"code":"ServiceError","message":"Bad Request: can't parse entities: Character '.' is reserved and must be escaped with the preceding '\'","innerHttpError":{"statusCode":400,"body":{"ok":false,"description":"Bad Request: can't parse entities: Character '.' is reserved and must be escaped with the preceding '\'","error_code":400}}}}
Bot will send message only when I manually perform Telegram escaping according to MarkdownV2 syntax:
{
"$kind": "Microsoft.SendActivity",
"activity": "Тest\\. Hello, World\\!"
},
So it looks like SendActivity
not used any 'parse_mode' before June 2 and begun to use 'parse_mode=MarkdownV2' since June 2, but I can't find any related source changes. This doesn't even look like SDK bug, instead it looks like something have changed on Azure side, but I can't find any notifications about it. So, maybe I miss something important when using SendActivity?