Botframework-sdk: on message received send back to message received

Created on 20 Oct 2016  路  6Comments  路  Source: microsoft/botframework-sdk

Hi,
What should I do to close a conversation on a message received and send back to the beginning stage?

The whole data can be reset if needed.

Just want to begin the whole dialogue again.

Most helpful comment

You can do session.replaceDialog(your_dialog_id)

All 6 comments

You can do session.replaceDialog(your_dialog_id)

@palmerabollo Let's say, am in a function,I give a prompt and user types in something, whatever the message be I want to send him to the starting of the whole conversation.
I don't have any session set as of now.

        private Task SendtoStart(IDialogContext context, IAwaitable<object> result)
        {
            context.Reset();
           // need to reste and send to MessagesController as a new msg from here
        }

Sorry, I thought you were using the node.js SDK. There must be something similar in the C# implementation, but I can't help you here.

It's fine i got the code for that!

@alokraj68 It would be nice if you could share it

@palmerabollo its actually a bad method. and am having some issues in that. once the issues are solved, i shall post it here.

Was this page helpful?
0 / 5 - 0 ratings