microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.49k stars 2.44k forks source link

[Question] Does only use Azure Notification Hubs to send a trigger to the client to open a new conversation with the bot for Directline channel? #2896

Closed rainmakerho closed 6 years ago

rainmakerho commented 7 years ago

I ref #1414 . Does any tutorials or code samples? Thanks.

EricDahlvang commented 7 years ago

@rainmakerho please check out https://github.com/MicrosoftDX/botFramework-proactiveMessages

nwhitmont commented 7 years ago

@rainmakerho Are you using .NET or Node SDK?

rainmakerho commented 7 years ago

@nwhitmont I use .NET Microsoft.Bot.Connector.DirectLine package. Thank for your help.

rainmakerho commented 7 years ago

@EricDahlvang I use Microsoft.Bot.Connector.DirectLine to manipulate bot's conversation in other webapi controller. I don't know how let DirectLine to get the message ,when i call "await Conversation.ResumeAsync(state.ConversationReference, message);" . Thank for your help.

EricDahlvang commented 7 years ago

@rainmakerho Please post the code you are using. I don't think I understand the question. Please try to rephrase or reword what you are asking.

By "manipulate bot's conversation in other webapi controller" are you asking how to send a proactive message through the direct line from within a different controller? (I believe the samples mentioned above work with any channel.)

rainmakerho commented 7 years ago

@EricDahlvang The code is at BotAuth. the project have 2 controllers(LineMessagesController.cs, MessagesController.cs). LineMessagesController will use DirectLineClient post message to MessagesController, when i post message to LineMessagesController. Login.aspx.cs will call Conversation.ResumeAsync method after Authentication. I don't know how to get the Resume Message with DirectLineClient.

LINE App -> LineMessagesController(DirectLineClient) end point -> my bot webapi (MessagesController)

Login.aspx (Conversation.ResumeAsync ) proactive message -> my bot webapi (MessagesController) -> Here ( i don't know how to get proactive message. Or i need push LineMessageController end point myself?)

Thank for your help.