From afab23098589f9e2b24a1be8a544252f39ea9930 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 13 Nov 2021 23:10:57 +0200 Subject: [PATCH] fdsfds --- files/classes/comment.py | 2 +- files/classes/submission.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 9703926fe..fd5764d70 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -327,7 +327,7 @@ class Comment(Base): url_noquery = url.split('?')[0] body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}") - if v and v.shadowbanned and self.author and self.author.shadowbanned and 86400 > time.time() - self.created_utc > 600: + if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 600: rand = random.randint(5,20) if self.upvotes < rand: self.upvotes = rand diff --git a/files/classes/submission.py b/files/classes/submission.py index d22e0e5f4..41a0aecb9 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -328,7 +328,7 @@ class Submission(Base): if v and not v.oldreddit: body = body.replace("old.reddit.com", "reddit.com") if v and v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net") - if v and v.shadowbanned and self.author and self.author.shadowbanned and 86400 > time.time() - self.created_utc > 600: + if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 600: rand = random.randint(5,20) if self.upvotes < rand: self.upvotes = rand