From f63bf4e718f37f52b1f1c81133285eedafe311d3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 15 Oct 2022 19:03:51 +0200 Subject: [PATCH] restore old pin behavior --- files/routes/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index c3296028c..03faa40af 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1219,6 +1219,8 @@ def sticky_post(post_id, v): if v.id != post.author_id: send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!") else: + if pins >= PIN_LIMIT: + abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!") post.stickied_utc = None pin_time = 'permanently' code = 201