From 4656fa0b8d6ec7dcb0bf7a2a26288227fcc4ebaf Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 28 Nov 2022 04:07:06 +0200 Subject: [PATCH] pin posts by pizza/impassionata/TGTW automatically for 1 hour --- files/helpers/actions.py | 2 +- files/routes/posts.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 092fab7bf..3182624ea 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -451,7 +451,7 @@ def execute_lawlz_actions(v:User, p:Submission): if SITE_NAME != 'rDrama': return if not FEATURES['PINS']: return p.stickied_utc = int(time.time()) + 86400 - p.stickied = v.username + p.stickied = AUTOJANNY_ID p.distinguish_level = 6 p.flair = filter_emojis_only(":ben10: Required Reading") pin_time = 'for 1 day' diff --git a/files/routes/posts.py b/files/routes/posts.py index d423a72db..44b8fac35 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -924,6 +924,10 @@ def submit_post(v:User, sub=None): execute_lawlz_actions(v, post) + if SITE == 'rdrama.net' and v.id in (IMPASSIONATA_ID, PIZZASHILL_ID, 2008): + p.stickied_utc = int(time.time()) + 3600 + p.stickied = AUTOJANNY_ID + cache.delete_memoized(frontlist) cache.delete_memoized(userpagelisting)