title: Bot Framework's context.Wait() not waiting for user input
body: <p>I am starting to develop a simple Bot, evolving from the Echo bot in the documentation. And I've hit an issue quickly.</p>
  
  <p>I have these three methods on my RootDialog:</p>
  
  <pre><code>public async Task StartAsync(IDialogContext context)
  {
     await context.PostAsync("Olá! Eu sou um bot!");
     await context.PostAsync("Qual é o teu nome?");
  
     context.Wait(NameReceivedAsync);
  }
  
  private async Task NameReceivedAsync(IDialogContext context, IAwaitable&lt;object&gt; result)
  {
     var activity = await result as Activity;
  
     userName = activity.Text;
  
     await context.PostAsync($"Olá {userName}. Podes dizer alguma coisa e eu vou repetir.");
  
     context.Wait(MessageReceivedAsync);
  }
  
  private async Task MessageReceivedAsync(IDialogContext context, IAwaitable&lt;object&gt; result)
  {
     var activity = await result as Activity;
  
     // calculate something for us to return
     int length = (activity.Text ?? string.Empty).Length;
  
     // return our reply to the user
     await context.PostAsync($"Tu disseste { activity.Text}, que tem {length} caracteres");
  
     context.Wait(MessageReceivedAsync);
  }
  </code></pre>
  
  <p>And my MessageController Post method is like this:</p>
  
  <pre><code>public async Task&lt;HttpResponseMessage&gt; Post([FromBody]Activity activity)
  {
     await Conversation.SendAsync(activity, () =&gt; new Dialogs.RootDialog());
  
     return new HttpResponseMessage(System.Net.HttpStatusCode.Accepted);
  }
  </code></pre>
  
  <p>The idea is for the bot to send two messages right away, wait for input with userName from the user, send another message, and then go to <em>MessageReceivedAsync</em> where he'll start his echo loop. The problem is the bot is not waiting for the inputs, only stopping at the end of the <em>MessageReceivedAsync</em>, where he'll start the echo.</p>
  
  <p>I can't seem to understand why this happens, since from what I've seen the <em>context.Wait(...)</em> should make the Bot wait for input, which is not happening. I'm testing it with the Bot Framework Channel Emulator on Chrome, if that makes any difference.</p>