Last active
November 19, 2018 23:56
-
-
Save jamesmundy/bc8ea2b10d39dfea2ec3f4ee99682c9c to your computer and use it in GitHub Desktop.
Deserializes requests and returns dialogs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deserialize the incoming activity | |
string jsonContent = await req.Content.ReadAsStringAsync(); | |
var activity = JsonConvert.DeserializeObject<Activity>(jsonContent); | |
if (activity != null) | |
{ | |
if (activity.Type == ActivityTypes.Message) | |
await Conversation.SendAsync(activity,() => | |
new NewPostcardDialog(Conversation.Container.Resolve<IAppSettingsService>(), | |
Conversation.Container.Resolve<IPaypalService>(), | |
Conversation.Container.Resolve<ITableService>(), | |
Conversation.Container.Resolve<IBugTrackingService>(), | |
Conversation.Container.Resolve<IAnalyticsService>())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment