forked from MarseyWorld/MarseyWorld
restore old pin behavior
parent
fafbcb5699
commit
f63bf4e718
|
@ -1219,6 +1219,8 @@ def sticky_post(post_id, v):
|
||||||
if v.id != post.author_id:
|
if v.id != post.author_id:
|
||||||
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!")
|
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!")
|
||||||
else:
|
else:
|
||||||
|
if pins >= PIN_LIMIT:
|
||||||
|
abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")
|
||||||
post.stickied_utc = None
|
post.stickied_utc = None
|
||||||
pin_time = 'permanently'
|
pin_time = 'permanently'
|
||||||
code = 201
|
code = 201
|
||||||
|
|
Loading…
Reference in New Issue