Exemplo n.º 1
0
        private async Task <bool> IsProblemEntry(string phoneNumber, string channel)
        {
            if (_raffleService.LatestRaffle == null)
            {
                await _raffleService.InitializeService();
            }

            if (!string.Equals(channel, "sms", StringComparison.CurrentCultureIgnoreCase))
            {
                TempJsonString = @"{""actions"": [{""say"":""Looks like you got to us from something other than SMS. Text in and let's see what happens.""}]}";
                return(await Task.FromResult(true));
            }
            else if (await _raffleService.ContainsPhoneNumber(phoneNumber))
            {
                TempJsonString = @"{""actions"": [{""say"": ""Looks like you've already entered our raffle. Sit tight. We'll let you know if you've won""}]}";
                return(await Task.FromResult(true));
            }

            return(await Task.FromResult(false));
        }