fdfd
This commit is contained in:
parent
ee16775f51
commit
92da25d7d8
2 changed files with 4 additions and 4 deletions
|
@ -330,9 +330,9 @@ class Comment(Base):
|
||||||
body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
||||||
|
|
||||||
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 60:
|
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 60:
|
||||||
ti = int((time.time() - self.created_utc)/60)
|
ti = max(int((time.time() - self.created_utc)/60), 1)
|
||||||
maxupvotes = min(ti, 31)
|
maxupvotes = min(ti, 31)
|
||||||
rand = randint(1, maxupvotes)
|
rand = randint(0, maxupvotes)
|
||||||
if self.upvotes < rand:
|
if self.upvotes < rand:
|
||||||
self.upvotes += randint(0, 5)
|
self.upvotes += randint(0, 5)
|
||||||
g.db.add(self)
|
g.db.add(self)
|
||||||
|
|
|
@ -330,9 +330,9 @@ class Submission(Base):
|
||||||
if v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
if v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
||||||
|
|
||||||
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 20:
|
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 20:
|
||||||
ti = int((time.time() - self.created_utc)/60)
|
ti = max(int((time.time() - self.created_utc)/60), 1)
|
||||||
maxupvotes = min(ti, 27)
|
maxupvotes = min(ti, 27)
|
||||||
rand = random.randint(1, maxupvotes)
|
rand = random.randint(0, maxupvotes)
|
||||||
if self.upvotes < rand:
|
if self.upvotes < rand:
|
||||||
self.upvotes += random.randint(0, 5)
|
self.upvotes += random.randint(0, 5)
|
||||||
g.db.add(self)
|
g.db.add(self)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue