0
[LuisIntent("test-intent")]
        public async Task test(IDialogContext context, IAwaitable<IMessageActivity> argument, LuisResult result)
        {
            await Conversation.SendAsync(context.MakeMessage(), () => SimpleFacebookAuthDialog.dialog);
        }

I tried this. But the problem occurs when i try to send simple string message

await context.PostAsync("msg");

from SimpleFacebookAuthDialog. It throws an exception

The data is changed.

context.MakeMessage() and Activity are not the same.

Some help ?

activ8
  • 181
  • 3
  • 17

1 Answers1

1

Try using context.Call or context.Forward which are the ways to launch child dialogs instead of

 await Conversation.SendAsync(context.MakeMessage(), () => SimpleFacebookAuthDialog.dialog);

Check this and the MultiDialogs sample for more information.

If you want to pass the same activity, then probably context.Forward is the way to go.

Community
  • 1
  • 1
Ezequiel Jadib
  • 14,767
  • 2
  • 38
  • 43
  • Please accept and upvote if it was useful. I provided some piece of advice on the other thread in GitHub (https://github.com/Microsoft/BotBuilder/issues/2110#issuecomment-275075947). Try moving the logic to a new dialog. But first try to read about al the core concepts involved. – Ezequiel Jadib Jan 25 '17 at 10:56