exiles
This commit is contained in:
parent
26fc6c1bf5
commit
fa868f8cbd
1 changed files with 76 additions and 76 deletions
|
@ -1292,6 +1292,7 @@ def submit_post(v, sub=None):
|
|||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
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':
|
||||
body = random.choice(christian_emojis)
|
||||
elif v.id == CARP_ID:
|
||||
|
@ -1368,7 +1369,6 @@ def submit_post(v, sub=None):
|
|||
|
||||
g.db.add(c)
|
||||
|
||||
snappy = g.db.query(User).filter_by(id = SNAPPY_ID).one_or_none()
|
||||
snappy.comment_count += 1
|
||||
snappy.coins += 1
|
||||
g.db.add(snappy)
|
||||
|
@ -1377,6 +1377,7 @@ def submit_post(v, sub=None):
|
|||
check_for_slots_command(body, snappy, c)
|
||||
|
||||
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()
|
||||
g.db.add(v)
|
||||
|
@ -1407,7 +1408,6 @@ def submit_post(v, sub=None):
|
|||
post.voted = 1
|
||||
if 'megathread' in post.title.lower(): sort = 'new'
|
||||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue