Created
August 9, 2016 07:29
-
-
Save adoprog/6ded6a1eb1b223025980bb1924d95e27 to your computer and use it in GitHub Desktop.
DirectLine post message
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
private void ImModality_InstantMessageReceived(object sender, MessageSentEventArgs e) | |
{ | |
... | |
var botConversation = directLineCLient.Conversations.NewConversationWithHttpMessagesAsync().Result.Body; | |
// Send message from Lync to Bot Framework | |
var message = new Message(); | |
message.ConversationId = botConversation.ConversationId; | |
message.Text = e.Text; | |
var result = directLineCLient.Conversations.PostMessageWithHttpMessagesAsync(botConversation.ConversationId, message).Result; | |
// Wait and then call to get the response back | |
directLineCLient.Conversations.GetMessagesWithHttpMessagesAsync(botConversation.ConversationId).Result; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment