forked from rDrama/rDrama
parent
9a2b80e374
commit
e68c2efb1b
|
@ -1041,6 +1041,19 @@ def submit_post(v, sub=None):
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
post.upvotes += 3
|
post.upvotes += 3
|
||||||
g.db.add(post)
|
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:
|
if SITE == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','braincels','truth') and v.id != AEVANN_ID:
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
@ -1056,6 +1069,21 @@ def submit_post(v, sub=None):
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
post.upvotes += 1
|
post.upvotes += 1
|
||||||
g.db.add(post)
|
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(frontlist)
|
||||||
cache.delete_memoized(User.userpagelisting)
|
cache.delete_memoized(User.userpagelisting)
|
||||||
|
|
Loading…
Reference in New Issue