Skip to content

Commit

Permalink
If post.is_answer is True, then send parent title to MS for the record.
Browse files Browse the repository at this point in the history
  • Loading branch information
teward committed Mar 27, 2017
1 parent 5301e27 commit 3119855
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions spamhandling.py
Expand Up @@ -115,11 +115,19 @@ def handle_spam(post, reasons, why):
post.user_name.strip(), poster_url, shortened_site)
username = post.user_name.strip()

t_metasmoke = Thread(name="metasmoke send post",
target=metasmoke.Metasmoke.send_stats_on_post,
args=(post.title, post_url, reasons, post.body, username,
post.user_link, why, post.owner_rep, post.post_score,
post.up_vote_count, post.down_vote_count))
if post.is_answer:
t_metasmoke = Thread(name="metasmoke send post",
target=metasmoke.Metasmoke.send_stats_on_post,
args=(post.parent.title, post_url, reasons, post.body, username,
post.user_link, why, post.owner_rep, post.post_score,
post.up_vote_count, post.down_vote_count))
else:
t_metasmoke = Thread(name="metasmoke send post",
target=metasmoke.Metasmoke.send_stats_on_post,
args=(post.title, post_url, reasons, post.body, username,
post.user_link, why, post.owner_rep, post.post_score,
post.up_vote_count, post.down_vote_count))

t_metasmoke.start()

log('debug', GlobalVars.parser.unescape(s).encode('ascii', errors='replace'))
Expand Down

0 comments on commit 3119855

Please sign in to comment.