This commit is contained in:
Aevann1 2021-10-20 23:06:25 +02:00
parent f8bb7a99be
commit fd655eadec
12 changed files with 105 additions and 31 deletions

View file

@ -1040,7 +1040,9 @@ def api_sticky_post(post_id, v):
post = g.db.query(Submission).options(lazyload('*')).filter_by(id=post_id).first()
if post:
if post.stickied: post.stickied = None
if post.stickied:
if post.stickied.startswith("t:"): abort(403)
else: post.stickied = None
else: post.stickied = v.username
g.db.add(post)