{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/issues/584","repository_url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet","labels_url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/issues/584/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/issues/584/comments","events_url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/issues/584/events","html_url":"https://github.com/Microsoft/botbuilder-dotnet/issues/584","id":324412128,"node_id":"MDU6SXNzdWUzMjQ0MTIxMjg=","number":584,"title":"Message Activity isn't updated with bot response in Middleware","user":{"login":"ClintFrancis","id":15001787,"node_id":"MDQ6VXNlcjE1MDAxNzg3","avatar_url":"https://avatars0.githubusercontent.com/u/15001787?v=4","gravatar_id":"","url":"https://api.github.com/users/ClintFrancis","html_url":"https://github.com/ClintFrancis","followers_url":"https://api.github.com/users/ClintFrancis/followers","following_url":"https://api.github.com/users/ClintFrancis/following{/other_user}","gists_url":"https://api.github.com/users/ClintFrancis/gists{/gist_id}","starred_url":"https://api.github.com/users/ClintFrancis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClintFrancis/subscriptions","organizations_url":"https://api.github.com/users/ClintFrancis/orgs","repos_url":"https://api.github.com/users/ClintFrancis/repos","events_url":"https://api.github.com/users/ClintFrancis/events{/privacy}","received_events_url":"https://api.github.com/users/ClintFrancis/received_events","type":"User","site_admin":false},"labels":[{"id":835664359,"node_id":"MDU6TGFiZWw4MzU2NjQzNTk=","url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/labels/docs","name":"docs","color":"0e8a16","default":false},{"id":801047408,"node_id":"MDU6TGFiZWw4MDEwNDc0MDg=","url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":{"login":"Kaiqb","id":29185255,"node_id":"MDQ6VXNlcjI5MTg1MjU1","avatar_url":"https://avatars2.githubusercontent.com/u/29185255?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaiqb","html_url":"https://github.com/Kaiqb","followers_url":"https://api.github.com/users/Kaiqb/followers","following_url":"https://api.github.com/users/Kaiqb/following{/other_user}","gists_url":"https://api.github.com/users/Kaiqb/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaiqb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaiqb/subscriptions","organizations_url":"https://api.github.com/users/Kaiqb/orgs","repos_url":"https://api.github.com/users/Kaiqb/repos","events_url":"https://api.github.com/users/Kaiqb/events{/privacy}","received_events_url":"https://api.github.com/users/Kaiqb/received_events","type":"User","site_admin":false},"assignees":[{"login":"Kaiqb","id":29185255,"node_id":"MDQ6VXNlcjI5MTg1MjU1","avatar_url":"https://avatars2.githubusercontent.com/u/29185255?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaiqb","html_url":"https://github.com/Kaiqb","followers_url":"https://api.github.com/users/Kaiqb/followers","following_url":"https://api.github.com/users/Kaiqb/following{/other_user}","gists_url":"https://api.github.com/users/Kaiqb/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaiqb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaiqb/subscriptions","organizations_url":"https://api.github.com/users/Kaiqb/orgs","repos_url":"https://api.github.com/users/Kaiqb/repos","events_url":"https://api.github.com/users/Kaiqb/events{/privacy}","received_events_url":"https://api.github.com/users/Kaiqb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-05-18T13:31:48Z","updated_at":"2018-06-18T17:33:40Z","closed_at":"2018-06-18T17:33:40Z","author_association":"NONE","body":"When testing out the echo bot sample, adding a piece of simple middleware never updates the text for the bot's response. When putting a break point in I can see that the emulator receives the response prior to the middleware hitting the break point.\r\n\r\nIf this isn't a bug, how do I log the bot's response??\r\n\r\n```\r\npublic async Task OnTurn(ITurnContext context, MiddlewareSet.NextDelegate next)\r\n{\r\n    if (context.Activity.Type == ActivityTypes.Message)\r\n    {\r\n        var userUtterance = context.Activity?.AsMessageActivity()?.Text.Trim().ToLower();\r\n\r\n        await next().ConfigureAwait(false);\r\n\r\n        var botResponse = context.Activity?.AsMessageActivity()?.Text.Trim().ToLower();\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/issues/comments/398134340","html_url":"https://github.com/Microsoft/botbuilder-dotnet/issues/584#issuecomment-398134340","issue_url":"https://api.github.com/repos/Microsoft/botbuilder-dotnet/issues/584","id":398134340,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODEzNDM0MA==","user":{"login":"vishwacsena","id":20918136,"node_id":"MDQ6VXNlcjIwOTE4MTM2","avatar_url":"https://avatars1.githubusercontent.com/u/20918136?v=4","gravatar_id":"","url":"https://api.github.com/users/vishwacsena","html_url":"https://github.com/vishwacsena","followers_url":"https://api.github.com/users/vishwacsena/followers","following_url":"https://api.github.com/users/vishwacsena/following{/other_user}","gists_url":"https://api.github.com/users/vishwacsena/gists{/gist_id}","starred_url":"https://api.github.com/users/vishwacsena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishwacsena/subscriptions","organizations_url":"https://api.github.com/users/vishwacsena/orgs","repos_url":"https://api.github.com/users/vishwacsena/repos","events_url":"https://api.github.com/users/vishwacsena/events{/privacy}","received_events_url":"https://api.github.com/users/vishwacsena/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T17:33:40Z","updated_at":"2018-06-18T17:33:40Z","author_association":"MEMBER","body":"@ClintFrancis - this is documented [here](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-create-middleware?view=azure-bot-service-4.0&tabs=csaddmiddleware%2Ccsetagoverwrite%2Ccsmiddlewareshortcircuit%2Ccsfallback%2Ccsactivityhandler). "}}
{"actor":{"display_login":"vishwacsena"}}