Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions BotAgentRemi/Dialogs/Need/NeedDialog.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using BotAgentRemi.State;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

using BotAgentRemi.State;

using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Extensions.Configuration;

using Shared;
using Shared.ApiInterface;
using Shared.Models;
using Shared.Prompts;
using Shared.Storage;
using Shared.Translation;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace BotAgentRemi.Dialogs.Need
{
Expand All @@ -31,22 +34,9 @@ public override Task<WaterfallDialog> GetWaterfallDialog(ITurnContext turnContex
return Task.Run(() =>
{
return new WaterfallDialog(Name, new WaterfallStep[]
{
async (dialogContext, cancellationToken) =>
{
return await dialogContext.PromptAsync(
Prompt.ConfirmPrompt,
new PromptOptions { Prompt = Phrases.Need.GetPrivacyConsent },
cancellationToken);
},
{
async (dialogContext, cancellationToken) =>
{
if (!(bool)dialogContext.Result)
{
await Messages.SendAsync(Phrases.Need.NoConsent, turnContext, cancellationToken);
return await dialogContext.EndDialogAsync(null, cancellationToken);
}

{
return await dialogContext.PromptAsync(
Prompt.TextPrompt,
new PromptOptions { Prompt = Phrases.Need.GetNeed },
Expand Down
7 changes: 4 additions & 3 deletions BotAgentRemi/Phrases.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.Bot.Builder;
using System.Collections.Generic;

using Microsoft.Bot.Builder;
using Microsoft.Bot.Schema;
using System.Collections.Generic;

namespace BotAgentRemi
{
Expand All @@ -22,7 +23,7 @@ public static class Options
public static class Need
{
public static Activity GetPrivacyConsent = MessageFactory.Text($"To help with your need," +
$" I'll need to share you phone number with my manager at Team Rubicon and the Greyshirt matched to you." +
$" I'll need to share your phone number with my manager at Team Rubicon and the Greyshirt matched to you." +
$" Don't worry, I'll never share your number with anyone else, and it won't be used for marketing. Your privacy is my priority." +
$" Is that okay? {Shared.Phrases.EnterNumber}");

Expand Down
8 changes: 5 additions & 3 deletions Shared/Phrases.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using Microsoft.Bot.Builder;
using System.Collections.Generic;

using Microsoft.Bot.Builder;
using Microsoft.Bot.Connector;
using Microsoft.Bot.Schema;

using Shared.Models;
using Shared.Translation;
using System.Collections.Generic;

namespace Shared
{
Expand Down Expand Up @@ -72,7 +74,7 @@ public static List<string> GetOptionsList(User user, Translator translator)
{
var list = new List<string> { UpdateLocation };

if (translator.IsConfigured)
if(translator.IsConfigured)
{
list.Add(UpdateLanguage);
}
Expand Down