unpin deleted comments

pull/211/head
Aevann 2023-09-29 04:25:14 +03:00
parent 8e27789847
commit fc59615e30
1 changed files with 3 additions and 0 deletions

View File

@ -439,7 +439,10 @@ def delete_comment(cid, v):
c = get_comment(cid, v=v)
if not c.deleted_utc:
if c.author_id != v.id: abort(403)
c.deleted_utc = int(time.time())
c.stickied = None
c.stickied_utc = None
g.db.add(c)
if not (c.parent_post in ADMIGGER_THREADS and c.level == 1):