dsffsd
This commit is contained in:
parent
4ab9670ffd
commit
23aaae073e
1 changed files with 4 additions and 2 deletions
|
@ -1030,8 +1030,10 @@ def api_sticky_post(post_id, v):
|
|||
else: post.stickied = None
|
||||
else:
|
||||
pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count()
|
||||
if pins > 2: return {"error": "Can't exceed 3 pinned posts limit!"}, 403
|
||||
post.stickied = v.username
|
||||
if pins > 2:
|
||||
t = int(time.time()) + 3600
|
||||
post.stickied = f"t:{t}"
|
||||
else: post.stickied = v.username
|
||||
g.db.add(post)
|
||||
|
||||
ma=ModAction(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue