0
votes

Now, I'm creating Microsoft Teams bot. I started from this sample (https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/57.teams-conversation-bot) to create bot.

Please see https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/57.teams-conversation-bot/Controllers/BotController.cs#L32 this line of code. When I send a message to Bot, Controller invoke Bots by that code.

I think there's a way to get the Request from the bot through PostAsync, but I can't figure it out.

For example, I want to use Request at here (https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/57.teams-conversation-bot/Bots/TeamsConversationBot.cs)

1
out of interest, what do you want on the original Request object? I'm asking because perhaps there's a way using the existing infrastructure to get itHilton Giesenow

1 Answers

0
votes

Please see my question above, about what you need from the Response object, as there might be another way to get the same thing, but in essence, your first place to look is on the TurnContext, and especially to the Activity.

If you don't find what you need there, you can look to extend the current pipeline through the use of Middleware, and it's also possible to implement your own Adapter, where you could attach properties to it, for example, that you can access through turnContext.Adapter.