forked from MarseyWorld/MarseyWorld
Exclude comments on drafts from edit limit.
Draft posts have already been excluded from the edit time limit for obvious reasons--drafts are intended to be edited, and people use them as personal megathreads on their profiles. Largely for the latter use case, this commit also excludes comments on drafts from the limit.master
parent
842022309f
commit
e212eb567d
|
@ -654,7 +654,7 @@ def edit_comment(cid, v):
|
|||
|
||||
c = get_comment(cid, v=v)
|
||||
|
||||
if time.time() - c.created_utc > 7*24*60*60:
|
||||
if time.time() - c.created_utc > 7*24*60*60 and not (c.post and c.post.private):
|
||||
return {"error":"You can't edit comments older than 1 week!"}, 403
|
||||
|
||||
if c.author_id != v.id: abort(403)
|
||||
|
|
Loading…
Reference in New Issue