use 'report' instead of 'flag'

pull/148/head
Aevann 2023-05-14 23:36:05 +03:00
parent 4e86e20a5a
commit beb8adcda5
3 changed files with 6 additions and 6 deletions

View File

@ -473,7 +473,7 @@ def execute_under_siege(v:User, target:Optional[Union[Submission, Comment]], bod
unshadowbannedcels = [x[0] for x in g.db.query(ModAction.target_user_id).filter_by(kind='unshadowban').all()] unshadowbannedcels = [x[0] for x in g.db.query(ModAction.target_user_id).filter_by(kind='unshadowban').all()]
if v.id in unshadowbannedcels: return True if v.id in unshadowbannedcels: return True
if type in ('flag', 'message'): if type in ('report', 'message'):
threshold = 86400 threshold = 86400
else: else:
threshold = UNDER_SIEGE_AGE_THRESHOLD threshold = UNDER_SIEGE_AGE_THRESHOLD

View File

@ -198,7 +198,7 @@ def execute_blackjack(v, target, body, type):
if target: if target:
if type == 'submission': if type == 'submission':
extra_info = target.permalink extra_info = target.permalink
elif type == 'flag': elif type == 'report':
extra_info = f"reports on {target.permalink}" extra_info = f"reports on {target.permalink}"
elif type in {'comment', 'message'}: elif type in {'comment', 'message'}:
for id in notified_ids: for id in notified_ids:

View File

@ -22,8 +22,8 @@ def flag_post(pid, v):
post = get_post(pid) post = get_post(pid)
reason = request.values.get("reason", "").strip() reason = request.values.get("reason", "").strip()
execute_under_siege(v, post, reason, 'flag') execute_under_siege(v, post, reason, 'report')
execute_blackjack(v, post, reason, 'flag') execute_blackjack(v, post, reason, 'report')
reason = reason[:100] reason = reason[:100]
og_flair = reason[1:] og_flair = reason[1:]
reason_html = filter_emojis_only(reason) reason_html = filter_emojis_only(reason)
@ -89,8 +89,8 @@ def flag_comment(cid, v):
if existing: abort(409, "You already reported this comment!") if existing: abort(409, "You already reported this comment!")
reason = request.values.get("reason", "").strip() reason = request.values.get("reason", "").strip()
execute_under_siege(v, comment, reason, 'flag') execute_under_siege(v, comment, reason, 'report')
execute_blackjack(v, comment, reason, 'flag') execute_blackjack(v, comment, reason, 'report')
reason = reason[:100] reason = reason[:100]
reason_html = filter_emojis_only(reason) reason_html = filter_emojis_only(reason)