Skip to content

Instantly share code, notes, and snippets.

@r4hulp
Created December 29, 2017 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r4hulp/90f225d33f679fb267d5e8111946603c to your computer and use it in GitHub Desktop.
Save r4hulp/90f225d33f679fb267d5e8111946603c to your computer and use it in GitHub Desktop.
Bot Framework Messages Controller without DI
/// <summary>
/// POST: api/Messages
/// Receive a message from a user and reply to it
/// </summary>
public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
{
if (activity.Type == ActivityTypes.Message)
{
await Conversation.SendAsync(activity, () => new Dialogs.RootDialog());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment