From 120fe920d775960da9bcac23ef506efb654f4569 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 23 Aug 2022 17:29:24 +0200 Subject: [PATCH] give a pemanent progstack effect to posts linking to '.win' domains --- files/routes/votes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index bf9e7e8da..e7b34e788 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -125,8 +125,12 @@ def vote_post(post_id, new, v): post.upvotes = g.db.query(Vote).filter_by(submission_id=post.id, vote_type=1).count() post.downvotes = g.db.query(Vote).filter_by(submission_id=post.id, vote_type=-1).count() post.realupvotes = g.db.query(Vote).filter_by(submission_id=post.id, real=True).count() - if post.author.progressivestack or post.sub in ('slackernews','space','istory','dinos'): + + if post.author.progressivestack \ + or post.sub in ('slackernews','space','istory','dinos') \ + or post.domain.endswith('.win'): post.realupvotes *= 2 + g.db.add(post) return "", 204