[backend/api] Check reaction name with and without colons
This commit is contained in:
parent
091d0e0c3f
commit
f639124881
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue