I'm using the code below to send a "Typing..." indicator to the user while my bot is doing some processing. This is sent the first thing on any message before any dialog is deserialized and launched.
The problem is the indicator does not disappear, even after 6 seconds as it should, according to facebook.
So after the bot sends its messages, the Typing... indicator still remains there forever.
This only happens on FB Messenger but not with other channels like Telegram or emulator.
if (activity.Type == ActivityTypes.Message)
{
Activity typing = activity.CreateReply(null);
typing.ServiceUrl = activity.ServiceUrl; //bug in ms bot framework? otherwise service URL is null
typing.Type = ActivityTypes.Typing;
ConnectorClient connector = new ConnectorClient(new Uri(typing.ServiceUrl));
await connector.Conversations.SendToConversationAsync(typing);
//do the actual bot's work here