suchismita
suchismita

Reputation: 31

how to call both normal dialog and LuisDialog from within the MessageController

I have a requirement, where based on some condition I need to call either a normal dialog or a LuisDialog, I am unable to achieve the same.

if(condition == 1)
  return await Conversation.SendAsync(message, () => new SampleLuisDialog());
else
  return await Conversation.SendAsync(message, () => new SimpleIDialog());

The issue is:
When it satisfies 2nd condition, it executes the logic within SimpleIDialog. When it satisfies the 1st condition instead of getting into the SampleLuisDialog, it again gets into startAsync of SimpleIDialog. What am I doing wrong here?

Upvotes: 1

Views: 522

Answers (1)

Eiren
Eiren

Reputation: 131

Inside of your first called Dialog, you will have to call Context.Done at some point. Before that, the User is "stuck" in that Dialog.

So before you start another Dialog, you will have to "Close" the first called Dialog.

Upvotes: 1

Related Questions