* sneed

* schizosneed

soren

* Update posts.py
master
scitzocel 2022-08-05 05:52:03 -04:00 committed by GitHub
parent 9a2b80e374
commit e68c2efb1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

View File

@ -1041,6 +1041,19 @@ def submit_post(v, sub=None):
g.db.add(v)
post.upvotes += 3
g.db.add(post)
if v.id == SOREN_ID:
autovote = Vote(
user_id=SCHIZO_ID,
submission_id=post.id,
vote_type=-1
)
g.db.add(autovote)
v.coins += 1
v.truecoins += 1
g.db.add(v)
post.downvotes += 1
g.db.add(post)
if SITE == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','braincels','truth') and v.id != AEVANN_ID:
g.db.flush()
@ -1056,6 +1069,21 @@ def submit_post(v, sub=None):
g.db.add(v)
post.upvotes += 1
g.db.add(post)
if SITE == 'rdrama.net' and post.sub and post.sub in ('stupidpol') and v.id not in (SOREN_ID, SCHIZO_ID):
g.db.flush()
autovote = Vote(
user_id=SCHIZO_ID,
submission_id=post.id,
vote_type=1
)
autovote.created_utc += 1
g.db.add(autovote)
v.coins += 1
v.truecoins += 1
g.db.add(v)
post.upvotes += 1
g.db.add(post)
cache.delete_memoized(frontlist)
cache.delete_memoized(User.userpagelisting)