I am referring sample code and tried simple scenario to display card. How to continue waterfall_Dialog after card display?
I am referring sample code 05.multi-turn-prompt and 06.using-cards - (https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/javascript_nodejs/05.multi-turn-prompt/dialogs/userProfileDialog.js)
...this.addDialog(new WaterfallDialog(WATERFALL_DIALOG, [
this.initialData.bind(this),
this.displayCard.bind(this),
this.text.bind(this)
])); ...
async run(turnContext, accessor) {
...}
async initialData(step) {
return await step.prompt(NAME_PROMPT, `Type anything to display card`);
}
async displayCard(step) {
await step.context.sendActivity({ attachments: [this.createAdaptiveCard()]});
}
async text(step) {
console.log("step.res"+step.context.activity.text);
await step.context.sendActivity("Thank you for selecting an option");
}
async displayCard(step) {
await step.context.sendActivity({ attachments: [this.createAdaptiveCard()]});
return await this.text(step);
}
To display card and continue waterfall Dialog.
After display of card it should continue the flow and display "Thank you for selecting an option",
But it is going to Begin_Dialog and asking for " Type anything to display card"
If I try other approach by call the next dialog. I get "Oops. Something went wrong!" "[onTurnError]: TypeError: Cannot read property 'status' of undefined"