From 9d5ef7027162b0e222560658f63cf8ee52a1dea2 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Mon, 19 Apr 2021 12:13:34 -0700 Subject: [PATCH] only post to discord when approving posts --- suchwow/routes/post.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/suchwow/routes/post.py b/suchwow/routes/post.py index a35aabb..d1270b3 100644 --- a/suchwow/routes/post.py +++ b/suchwow/routes/post.py @@ -156,14 +156,9 @@ def approve(id): post_webhook(f"Post [{post.id}]({url}) approved :white_check_mark: by `{get_session_user()}` :fieri_parrot:") flash("Approved") if current_app.config["DEBUG"] is False: - if not post.to_reddit: - _r = make_post(post) if not post.to_discord: _d = post_discord_webhook(post) - if _r and _d: - post_webhook(f"Post [{post.id}]({url}) submitted :dab_parrot: to Reddit and Discord.") - else: - post_webhook(f"Post [{post.id}]({url}) failed :this-is-fine-fire: to post to socials...Reddit: {_r} - Discord: {_d}") + post_webhook(f"Post [{post.id}]({url}) submitted :dab_parrot: to Discord.") return redirect(url_for("mod_queue")) else: flash("You can't approve this")