master
Aevann1 2021-10-29 19:17:11 +02:00
parent 37f9536650
commit 5fde28968c
1 changed files with 6 additions and 2 deletions

View File

@ -850,8 +850,12 @@ def toggle_pin_comment(cid, v):
if comment.is_pinned:
if comment.is_pinned.startswith("t:"): abort(403)
else: comment.is_pinned = None
else: comment.is_pinned = v.username
else:
if v.admin_level == 6 or comment.is_pinned.endswith(" (OP)"): comment.is_pinned = None
else: abort(403)
else:
if v.admin_level == 6: comment.is_pinned = v.username
else: comment.is_pinned = v.username + " (OP)"
g.db.add(comment)
g.db.flush()