Fix a bug where users could modify their own karma, because the user check was an object reference check rather than a user-id check

This commit is contained in:
Daan Boerlage 2022-04-15 10:33:09 +01:00
parent 193a651495
commit b30c048bac
Signed by: daan
GPG key ID: FCE070E1E4956606

View file

@ -25,7 +25,7 @@ public class Karma
var authorRecord = await GetUser(long.Parse(author.Id));
// Check if the user can change karma
if (targetUser == author)
if (targetUser.Id == author.Id)
{
var message = change switch
{