My bot has LUIS dialog with a couple of intents. I call LUIS dialog from my MessageController. If the intent is detected, I start a child dialog. When the child dialog is done, I call context.Done("response from user").
After that ChlildDialogDone
task is called.
Inside ChildDialogDone
task I want to call the LUIS dialog again to detect the intent of user's message (which comes to ChildDialogDone
). Now inside ChildDialogDone
I have context.Wait(MessageReceived).
When this line of code is executed, nothing happens, my bot is waiting for the next message from user.
Here is the code:
[Serializable]
public partial class DefiningIntentDialog : LuisDialog<object>
{
[LuisIntent("")]
public async Task NoIntent(IDialogContext context, LuisResult result)
{
var dialog = new GreetingsDialog();
dialog.InitialMessage = result.Query;
context.Call(dialog, GreetingDialogDone);
}
[LuisIntent("Email")]
public virtual async Task ConfirmationEmail(IDialogContext context, LuisResult result)
{
await context.Forward(new EmailDialog, EmailDialogDone, "message", CancellationToken.None);
}
private async Task EmailDialogDone(IDialogContext context, IAwaitable<string> argument)
{
var messageHandled = await argument;
context.Wait(MessageReceived);
}
}
So inside EmailDialogDone I have some message from user and I want to execute DefiningIntent dialog with this message again. How can I do it?