Bot Framework .Net. Add typing indicator on Bot

Viewed 80

I want to add a typing indicator before the bot reply to the user on the WaterfallStepContext. Is it possible?

enter image description here

1 Answers

You can send a "Typing" Activity from a WaterfallStepContext by

  1. Creating a reply from the context
  2. Setting the type to ActivityTypes.Typing
  3. Then sending it from the context
    Activity TypingActivity = stepContext.Context.Activity.CreateReply();
    TypingActivity.Type = ActivityTypes.Typing;
    await stepContext.Context.SendActivityAsync(TypingActivity);
Related