forked from rDrama/rDrama
fix agendapostered wall comments
parent
13a208ee88
commit
3971607aee
|
@ -1360,7 +1360,7 @@ def remove_comment(c_id, v):
|
||||||
def approve_comment(c_id, v):
|
def approve_comment(c_id, v):
|
||||||
comment = get_comment(c_id)
|
comment = get_comment(c_id)
|
||||||
|
|
||||||
if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower() and comment.post.sub != 'chudrama':
|
if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower() and not (comment.parent_submission and comment.post.sub == 'chudrama'):
|
||||||
abort(400, "You can't bypass the chud award!")
|
abort(400, "You can't bypass the chud award!")
|
||||||
|
|
||||||
if comment.is_banned:
|
if comment.is_banned:
|
||||||
|
|
|
@ -590,7 +590,7 @@ def edit_comment(cid, v):
|
||||||
if v.marsify:
|
if v.marsify:
|
||||||
body_for_sanitize = marsify(body_for_sanitize)
|
body_for_sanitize = marsify(body_for_sanitize)
|
||||||
|
|
||||||
torture = (v.agendaposter and not v.marseyawarded and c.post.sub != 'chudrama')
|
torture = (v.agendaposter and not v.marseyawarded and not (c.parent_submission and c.post.sub == 'chudrama'))
|
||||||
|
|
||||||
body_html = sanitize(body_for_sanitize, golden=False, limit_pings=5, torture=torture)
|
body_html = sanitize(body_for_sanitize, golden=False, limit_pings=5, torture=torture)
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ def edit_comment(cid, v):
|
||||||
execute_blackjack(v, c, c.body, "comment")
|
execute_blackjack(v, c, c.body, "comment")
|
||||||
execute_under_siege(v, c, c.body, "comment")
|
execute_under_siege(v, c, c.body, "comment")
|
||||||
|
|
||||||
if not (c.parent_submission and c.post.id in ADMIGGER_THREADS) and v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and c.post.sub != 'chudrama':
|
if not (c.parent_submission and c.post.id in ADMIGGER_THREADS) and v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and not (c.parent_submission and c.post.sub == 'chudrama'):
|
||||||
abort(403, f'You have to include "{AGENDAPOSTER_PHRASE}" in your comment!')
|
abort(403, f'You have to include "{AGENDAPOSTER_PHRASE}" in your comment!')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue