From a500d548578f05770a6b152e568d65213b0a4cec Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Nov 2021 02:32:38 +0200 Subject: [PATCH] fdsfsd --- files/helpers/const.py | 3 +++ files/routes/posts.py | 4 ++-- files/routes/users.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index a1a189be7..41afaa0f6 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -749,3 +749,6 @@ TROLLTITLES = [ "Pretty sure this is @{username}'s Reddit account", "Hey jannies can you please ban @{username}", ] + +BUG_THREAD = 18459 +EMOJI_THREAD = 22479 \ No newline at end of file diff --git a/files/routes/posts.py b/files/routes/posts.py index a7ead3dc7..061a2cd12 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -127,7 +127,7 @@ def post_id(pid, anything=None, v=None): if post.club and not (v and v.paid_dues) or post.private and not (v and (v.id == post.author_id or v.admin_level > 1)): abort(403) - if request.host == 'rdrama.net' and pid == 22479: sort = 'new' + if request.host == 'rdrama.net' and [BUG_THREAD, EMOJI_THREAD]: sort = 'new' if v: votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery() @@ -200,7 +200,7 @@ def post_id(pid, anything=None, v=None): post.replies = comments.filter(Comment.is_pinned != None).all() + comments.filter(Comment.level == 1, Comment.is_pinned == None).all() - if request.host == 'rdrama.net' and pid == 22479: post.replies = post.replies[:20] + if request.host == 'rdrama.net' and pid in [BUG_THREAD, EMOJI_THREAD]: post.replies = post.replies[:10] post.views += 1 g.db.add(post) diff --git a/files/routes/users.py b/files/routes/users.py index ca7e80f32..284240d50 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -308,6 +308,7 @@ def unsubscribe(v, post_id): @app.get("/report_bugs") @auth_required def reportbugs(v): + if request.host == 'rdrama.net': return redirect('https://rdrama.net/post/18459') return render_template("reportbugs.html", v=v) @app.post("/@/message")