forked from rDrama/rDrama
exiles
parent
c8543c80d2
commit
0ee3c2b5c8
|
@ -1292,6 +1292,7 @@ def submit_post(v, sub=None):
|
||||||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||||
g.db.add(n)
|
g.db.add(n)
|
||||||
|
|
||||||
|
if not (post.sub and g.db.query(Exile.user_id).filter_by(user_id=SNAPPY_ID, sub=post.sub)):
|
||||||
if post.sub == 'dankchristianmemes':
|
if post.sub == 'dankchristianmemes':
|
||||||
body = random.choice(christian_emojis)
|
body = random.choice(christian_emojis)
|
||||||
elif v.id == CARP_ID:
|
elif v.id == CARP_ID:
|
||||||
|
@ -1368,7 +1369,6 @@ def submit_post(v, sub=None):
|
||||||
|
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
snappy = g.db.query(User).filter_by(id = SNAPPY_ID).one_or_none()
|
|
||||||
snappy.comment_count += 1
|
snappy.comment_count += 1
|
||||||
snappy.coins += 1
|
snappy.coins += 1
|
||||||
g.db.add(snappy)
|
g.db.add(snappy)
|
||||||
|
@ -1377,6 +1377,7 @@ def submit_post(v, sub=None):
|
||||||
check_for_slots_command(body, snappy, c)
|
check_for_slots_command(body, snappy, c)
|
||||||
|
|
||||||
post.comment_count += 1
|
post.comment_count += 1
|
||||||
|
if len(body_html) < 40000: post.replies = [c]
|
||||||
|
|
||||||
v.post_count = g.db.query(Submission.id).filter_by(author_id=v.id, is_banned=False, deleted_utc=0).count()
|
v.post_count = g.db.query(Submission.id).filter_by(author_id=v.id, is_banned=False, deleted_utc=0).count()
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
@ -1407,7 +1408,6 @@ def submit_post(v, sub=None):
|
||||||
post.voted = 1
|
post.voted = 1
|
||||||
if 'megathread' in post.title.lower(): sort = 'new'
|
if 'megathread' in post.title.lower(): sort = 'new'
|
||||||
else: sort = v.defaultsortingcomments
|
else: sort = v.defaultsortingcomments
|
||||||
if len(body_html) < 40000: post.replies = [c]
|
|
||||||
return render_template('submission.html', v=v, p=post, sort=sort, render_replies=True, offset=0, success=True, sub=post.subr)
|
return render_template('submission.html', v=v, p=post, sort=sort, render_replies=True, offset=0, success=True, sub=post.subr)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue