From 72de465c34ea710b383c5d959397a50b1c6ee5ac Mon Sep 17 00:00:00 2001 From: Shikhir Arora Date: Thu, 2 Mar 2017 03:57:39 -0500 Subject: [PATCH] Update QuoteRepository.cs handle all standard cases (matches text that contains the exact, upper, or lowercase forms of the input text to search) --- .../Services/Database/Repositories/Impl/QuoteRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs index fe41b6d2..fff61d22 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs @@ -27,7 +27,8 @@ namespace NadekoBot.Services.Database.Repositories.Impl { var rngk = new NadekoRandom(); lowertext = text.ToLowerInvariant(); - return _set.Where(q => q.Text.Contains(text) || q.Text.Contains(lowertext) && q.GuildId == guildId && q.Keyword == keyword).OrderBy(q => rngk.Next()).FirstOrDefaultAsync(); + uppertext = text.ToUpperInvariant(); + return _set.Where(q => q.Text.Contains(text) || q.Text.Contains(lowertext) || q.Text.Contains(uppertext) && q.GuildId == guildId && q.Keyword == keyword).OrderBy(q => rngk.Next()).FirstOrDefaultAsync(); } } }