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:
parent
193a651495
commit
b30c048bac
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue