From 026cfa0e8240445917f771201aaa77e36575cfab Mon Sep 17 00:00:00 2001 From: pancakes Date: Sat, 8 Mar 2025 00:28:50 +1000 Subject: [PATCH] [backend/api] Improve remote emoji query --- Iceshrimp.Backend/Controllers/Web/EmojiController.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Iceshrimp.Backend/Controllers/Web/EmojiController.cs b/Iceshrimp.Backend/Controllers/Web/EmojiController.cs index 45872faa..0e8e29a0 100644 --- a/Iceshrimp.Backend/Controllers/Web/EmojiController.cs +++ b/Iceshrimp.Backend/Controllers/Web/EmojiController.cs @@ -59,10 +59,8 @@ public class EmojiController( { var res = await db.Emojis .Where(p => p.Host != null - && (!string.IsNullOrWhiteSpace(host) && p.Host.ToLower().Contains(host.ToLower()) - || string.IsNullOrWhiteSpace(host)) - && (!string.IsNullOrWhiteSpace(name) && p.Name.ToLower().Contains(name.ToLower()) - || string.IsNullOrWhiteSpace(name))) + && (string.IsNullOrWhiteSpace(host) || p.Host.ToLower().Contains(host.ToLower())) + && (string.IsNullOrWhiteSpace(name) || p.Name.ToLower().Contains(name.ToLower()))) .Select(p => new EmojiResponse { Id = p.Id,