public async Task PentaKOPNewEntry(IDialogContext ctx, IAwaitable <IMessageActivity> messageAwaitable, LuisResult result) { if (ctx.UserData.TryGetValue(LastPentaKopEntryKeyName, out string projectName)) { PromptDialog.Confirm(ctx, ConfirmLastPentaKopEntryAsync, $"Would you like to log your usual {projectName}?"); } else { ctx.Call(PentaKOPNewEntryDialog.CreateDialog(1, "", ""), PentaKOPNewEntryDoneAsync); //ctx.Wait(MessageReceived); can't handle } }
private async Task ConfirmLastPentaKopEntryAsync(IDialogContext ctx, IAwaitable <bool> isConfirmed) { if (await isConfirmed) { var projectName = ctx.UserData.GetValue <string>(LastPentaKopEntryKeyName); ctx.Call(PentaKOPNewEntryDialog.CreateDialog(project: projectName), PentaKOPNewEntryDoneAsync); } else { await ctx.SayAsync("No problem. So how can I help you?", InputHints.ExpectingInput); ctx.Wait(MessageReceived); } }