dont notify jannies of draft effortposts until they're published

pull/225/head
Aevann 2024-03-09 08:05:56 +02:00
parent a52dcd2a8d
commit 4eb56c860b
1 changed files with 5 additions and 1 deletions

View File

@ -92,6 +92,10 @@ def publish(pid, 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!"}
@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)
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!"
alert_admins(body)