Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return await stepContext.BeginDialogAsync("loginprompt", cancellationToken: cancellationToken); // This actually calls the dialogue of OAuthPrompt whose name is in EchoWithCounterBot.LoginPromptName.
- });
- AddStep(async (stepContext, cancellationToken) =>
- {
- Tokenresponse = (TokenResponse)stepContext.Result;
- if (Tokenresponse != null)
- {
- await stepContext.Context.SendActivityAsync($"logged in successfully... ");
- return await stepContext.BeginDialogAsync(DisplayOptionsDialog.Id); //Here it goes To another dialogue class where options are displayed
- }
- else
- {
- await stepContext.Context.SendActivityAsync("Login was not successful, Please try again...", cancellationToken: cancellationToken);
- await stepContext.BeginDialogAsync("loginprompt", cancellationToken: cancellationToken);
- }
- return await stepContext.EndDialogAsync();
- });
- }
- public static new string Id => "LoginDialog";
- public static LoginDialog Instance { get; } = new LoginDialog(Id);
- AddDialog(Prompt(ConnectionName));
- AddDialog(LoginDialog.Instance);
- InitialDialogId = LoginDialog.Id;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement