From b7403c945a8fb987959141e3263e6206d921ebc8 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 10 Dec 2020 13:16:41 -0800 Subject: [PATCH] fix message posting --- suchwow/routes/post.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/suchwow/routes/post.py b/suchwow/routes/post.py index ae85812..2546698 100644 --- a/suchwow/routes/post.py +++ b/suchwow/routes/post.py @@ -8,7 +8,8 @@ from suchwow import config from suchwow.models import Post, Comment from suchwow.utils.decorators import login_required, profile_required, moderator_required from suchwow.utils.helpers import allowed_file, is_moderator, get_session_user -from suchwow.app import post_meme +from suchwow.reddit import make_post +from suchwow.discord import post_discord_webhook bp = Blueprint("post", "post") @@ -109,7 +110,10 @@ def approve(id): if post: post.approved = True post.save() - post_meme(post.id) + if not post.to_reddit: + make_post(post) + if not post.to_discord: + post_discord_webhook(post) flash("Approved") return redirect(url_for("mod_queue")) else: