Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added async comment call on report post call #3352

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions chatcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,9 @@ def report_posts(urls, reported_by, reported_in=None, blacklist_by=None, operati

# Always handle if reported
if scan_spam and operation != "report-direct":
handle_spam(post=post, reasons=scan_reasons, why=report_info + scan_why.lstrip())
comment = report_info + scan_why.lstrip()
handle_spam(post=post, reasons=scan_reasons, why=comment)
Tasks.later(Metasmoke.post_auto_comment, comment, reported_by, url=url, after=300)
continue

# scan_spam == False
Expand All @@ -1728,9 +1730,11 @@ def report_posts(urls, reported_by, reported_in=None, blacklist_by=None, operati
else:
why_append = "This post would not have been caught otherwise."

comment = report_info + why_append
handle_spam(post=post,
reasons=["Manually reported " + post_data.post_type + batch],
why=report_info + why_append)
why=comment)
Tasks.later(Metasmoke.post_auto_comment, comment, reported_by, url=url, after=300)
continue

# scan_spam == False and "scan"
Expand Down