fgd
This commit is contained in:
parent
8ddff4ecd3
commit
17c54c6e31
1 changed files with 3 additions and 1 deletions
|
@ -158,6 +158,7 @@ def api_comment(v):
|
||||||
|
|
||||||
if parent_post.club and not (v and (v.paid_dues or v.id == parent_post.author_id)): abort(403)
|
if parent_post.club and not (v and (v.paid_dues or v.id == parent_post.author_id)): abort(403)
|
||||||
|
|
||||||
|
rts = False
|
||||||
if parent_fullname.startswith("t2_"):
|
if parent_fullname.startswith("t2_"):
|
||||||
parent = parent_post
|
parent = parent_post
|
||||||
parent_comment_id = None
|
parent_comment_id = None
|
||||||
|
@ -169,6 +170,7 @@ def api_comment(v):
|
||||||
level = parent.level + 1
|
level = parent.level + 1
|
||||||
if level == 2: top_comment_id = parent.id
|
if level == 2: top_comment_id = parent.id
|
||||||
else: top_comment_id = parent.top_comment_id
|
else: top_comment_id = parent.top_comment_id
|
||||||
|
if parent.author_id == v.id: rts = True
|
||||||
else: abort(400)
|
else: abort(400)
|
||||||
|
|
||||||
body = request.values.get("body", "").strip()[:10000]
|
body = request.values.get("body", "").strip()[:10000]
|
||||||
|
@ -667,7 +669,7 @@ def api_comment(v):
|
||||||
|
|
||||||
check_for_treasure(body, c)
|
check_for_treasure(body, c)
|
||||||
|
|
||||||
if not c.slots_result and not c.blackjack_result and not c.wordle_result:
|
if not c.slots_result and not c.blackjack_result and not c.wordle_result and not rts:
|
||||||
parent_post.comment_count += 1
|
parent_post.comment_count += 1
|
||||||
g.db.add(parent_post)
|
g.db.add(parent_post)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue