diff --git a/files/classes/user.py b/files/classes/user.py index 0453d94d1..5baf2e5de 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -743,6 +743,11 @@ class User(Base): return output + @property + @lazy + def alt_ids(self): + return [x.id for x in self.alts] + @property @lazy def moderated_subs(self): diff --git a/files/routes/votes.py b/files/routes/votes.py index e681acb24..d9ab61768 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -61,6 +61,9 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): if v.id == target.author.id: coin_delta = 0 + if target.author.id in v.alt_ids or v.id in target.author.alt_ids: + coin_delta = -1 + coin_mult = 1 g.db.flush()