Fixed not passing the logged user to the censor

This commit is contained in:
Yo Mama 2021-10-16 20:56:12 +02:00
parent 0de6608408
commit 4cc5a554d4
4 changed files with 26 additions and 26 deletions

View file

@ -342,7 +342,7 @@ class Submission(Base):
if self.club and not (v and v.paid_dues): return "COUNTRY CLUB ONLY"
body = self.body_html
body = censor_slurs(body)
body = censor_slurs(body, v)
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")
@ -352,7 +352,7 @@ class Submission(Base):
if self.club and not (v and v.paid_dues): return "COUNTRY CLUB ONLY"
body = self.body
body = censor_slurs(body)
body = censor_slurs(body, v)
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")