private async Task Refresh(IDialogContext context, string message, bool alertWhenDone = false) { // Warn user there will be some lag await context.PostAsync("Hold on, refreshing against the database."); // Check current user and refresh data based off their credentials User user = await GetUser(context, message); DataRetriever.GetAllData(user.alias); // Post response if (alertWhenDone) { await context.PostAsync("Ok, done refreshing!"); } }
private async Task ResumeAfterAuth(IDialogContext context, IAwaitable <string> result) { var message = await result; // Get current user and refresh data based on their credentials User user = await GetUser(context, message); DataRetriever.GetAllData(user.alias); // Tell user they are authenticated // Post response and end this dialog await context.PostAsync(message); await context.PostAsync("If you want me to log you off, just say \"logout\"."); context.Wait(MessageReceivedAsync); }