forked from rDrama/rDrama
1
0
Fork 0

pins: use variable instead of recomputing again

master
justcool393 2022-11-01 15:15:29 -05:00
parent 02efc44682
commit f665941e16
1 changed files with 2 additions and 2 deletions

View File

@ -1188,12 +1188,12 @@ def sticky_post(post_id, v):
abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")
if not post.stickied_utc:
post.stickied_utc = int(time.time()) + 3600
post.stickied_utc = sticky_time
pin_time = 'for 1 hour'
if v.id != post.author_id:
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!")
else:
post.stickied_utc = None
post.stickied_utc = sticky_time
pin_time = 'permanently'
post.stickied = v.username