From f63912488182af567d85c7ac220a0cfa25fc42e7 Mon Sep 17 00:00:00 2001 From: pancakes Date: Sat, 8 Mar 2025 01:27:05 +1000 Subject: [PATCH] [backend/api] Check reaction name with and without colons --- Iceshrimp.Backend/Controllers/Web/NoteController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Controllers/Web/NoteController.cs b/Iceshrimp.Backend/Controllers/Web/NoteController.cs index bc5e664a..26cc0a89 100644 --- a/Iceshrimp.Backend/Controllers/Web/NoteController.cs +++ b/Iceshrimp.Backend/Controllers/Web/NoteController.cs @@ -158,8 +158,10 @@ public class NoteController( .FirstOrDefaultAsync() ?? throw GracefulException.NotFound("Note not found"); + name = name.Trim(':'); + var users = await db.NoteReactions - .Where(p => p.Note == note && p.Reaction == name) + .Where(p => p.Note == note && (p.Reaction == $":{name}:" || p.Reaction == name)) .Include(p => p.User.UserProfile) .Select(p => p.User) .ToListAsync();