Typing indicator implementation in Bot Composer bot

owenpww 1 Reputation point
2021-12-02T19:30:37.78+00:00

I've been trying to implement the typing indicator (befor the bot sends a message) for a bot created through Bot Framework Composer. The guidelines are to set the the showTyping property in appsettings.json to true but when I do this it will sometimes display the typing indicator before the bot sends a message but sometimes it will only display the typing indicator after the bot message.

An alternative I've tried that was working but only locally was creating a custom middleware component (following this https://learn.microsoft.com/en-us/composer/how-to-create-custom-actions?tabs=csharp#export-the-bot-runtime), referencing it inside my composer bot and then adding the name of the new component to my components array in appsettings.json. This successfully sent the typing activity and showed it in chat locally on Composer itself or testing using ngrok. But whenever I would deploy the code to Azure and Test in Webchat or use it in our client application linked to this hosted Azure bot, it would always send back a 502/500 error saying that there's a missing secret or token on the request webchat/join when in fact the Authorization header seems to contain the token returned when creating the conversation (post request to https://directline.botframework.com/v3/directline/conversations). Attached are pictures of the failing request (requests before this to create a token or conversation still remain successful) and the response.

[1]: https://i.stack.imgur.com/JQyfI.png [2]: https://i.stack.imgur.com/zBEaG.png [3]: https://i.stack.imgur.com/RAm8q.png [4]: https://i.stack.imgur.com/KvHAp.png

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
807 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,645 questions
{count} votes