dont notify jannies of draft effortposts until they're published
parent
a52dcd2a8d
commit
4eb56c860b
|
@ -92,6 +92,10 @@ def publish(pid, v):
|
||||||
|
|
||||||
execute_snappy(p, v)
|
execute_snappy(p, v)
|
||||||
|
|
||||||
|
if flag_effortpost and not (SITE_NAME == 'WPD' and v.truescore < 500):
|
||||||
|
body = f"@{v.username} has requested that {p.textlink} be marked as an effortpost!"
|
||||||
|
alert_admins(body)
|
||||||
|
|
||||||
return {"message": "Post has been published successfully!"}
|
return {"message": "Post has been published successfully!"}
|
||||||
|
|
||||||
@app.get("/submit")
|
@app.get("/submit")
|
||||||
|
@ -734,7 +738,7 @@ def submit_post(v, hole=None):
|
||||||
generate_thumb = (not p.thumburl and p.url and p.domain != SITE)
|
generate_thumb = (not p.thumburl and p.url and p.domain != SITE)
|
||||||
gevent.spawn(postprocess_post, p.url, p.body, p.body_html, p.id, generate_thumb, False)
|
gevent.spawn(postprocess_post, p.url, p.body, p.body_html, p.id, generate_thumb, False)
|
||||||
|
|
||||||
if flag_effortpost and not (SITE_NAME == 'WPD' and v.truescore < 500):
|
if not p.draft and flag_effortpost and not (SITE_NAME == 'WPD' and v.truescore < 500):
|
||||||
body = f"@{v.username} has requested that {p.textlink} be marked as an effortpost!"
|
body = f"@{v.username} has requested that {p.textlink} be marked as an effortpost!"
|
||||||
alert_admins(body)
|
alert_admins(body)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue