From 4b8387a01c9854ac26da7dd3103057b89d9f7404 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 28 Nov 2022 01:16:33 +0200 Subject: [PATCH] dont count votes as real if made by alt --- files/routes/votes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index c4d53ce2a..09c6cab1d 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -60,8 +60,10 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): if v.id == target.author.id: coin_delta = 0 + alt = False if target.author.id in v.alt_ids or v.id in target.author.alt_ids: coin_delta = -1 + alt = True coin_mult = 1 @@ -101,7 +103,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): target.author.truescore += coin_delta g.db.add(target.author) - real = new != 1 or v.is_votes_real + real = alt or new != 1 or v.is_votes_real vote = None if vote_cls == Vote: vote = Vote(user_id=v.id,