Created
March 28, 2020 01:15
-
-
Save dhinag/13f7ef0c7ebe2e4d223bf62a0e1124a5 to your computer and use it in GitHub Desktop.
This file contains 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
// Invoked when a conversation update activity is received from the external Azure Bot Service channel | |
// Start a Power Virtual Agents bot conversation and store the mapping | |
protected override async Task OnConversationUpdateActivityAsync(ITurnContext<IConversationUpdateActivity> turnContext, CancellationToken cancellationToken) | |
{ | |
AddConversationReference(turnContext.Activity as Bot.Schema.Activity); | |
await s_conversationManager.GetOrCreateBotConversationAsync(turnContext.Activity.Conversation.Id, _botService); | |
} | |
private void AddConversationReference(Bot.Schema.Activity activity) | |
{ | |
var conversationReference = activity.GetConversationReference(); | |
var convRefJson = JsonConvert.SerializeObject(conversationReference); | |
var response = RunFlow("https://prod-44.westus.logic.azure.com:443/workflows/13b923e53a14476ec53112f90/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=T1xN6wEvP0hL27BUY", convRefJson); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment