I'm using the .Net backend for my bot based on the bot framework. In one of my dialogs I give the user the option to return to the root dialog - or at least, that's what I'm trying to do but no success. Here's what I have already tried:
context.Reset()
- I learned that I may not use this from inside a dialog; it causes a crashConversation.SendAsync((IMessageActivity)context.Activity, () => new RootDialog())
- does not seem to do anythingIdeally I just want to get back to what is first on the stack without having to hardcode the RootDialog
type.
As pointed out by Ezequiel, context.Done() is how to end the current dialog, and return control to the calling dialog.
https://docs.botframework.com/.../sdkreference/dialog_stack.html
void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Done(R value)
Complete the current dialog and return a result to the parent dialog.
Parameters
value: The value of the result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With