fix this https://watchpeopledie.tv/h/meta/post/27855/hidden-thread-for-viewing-notifications/1443770#context
parent
6a367b186e
commit
48da547fb8
|
@ -45,16 +45,19 @@ def _mark_comment_as_read(cid, vid):
|
|||
def post_pid_comment_cid(cid, v, pid=None, anything=None, sub=None):
|
||||
|
||||
comment = get_comment(cid, v=v)
|
||||
|
||||
if comment.parent_post:
|
||||
post = comment.parent_post
|
||||
elif comment.wall_user_id:
|
||||
return redirect(f"/id/{comment.wall_user_id}/wall/comment/{comment.id}")
|
||||
else:
|
||||
post = NOTIFICATION_THREAD
|
||||
|
||||
if not User.can_see(v, comment): abort(403)
|
||||
|
||||
if v and request.values.get("read"):
|
||||
gevent.spawn(_mark_comment_as_read, comment.id, v.id)
|
||||
|
||||
if comment.parent_post:
|
||||
post = comment.parent_post
|
||||
else:
|
||||
post = NOTIFICATION_THREAD
|
||||
|
||||
post = get_post(post, v=v)
|
||||
|
||||
if not (v and v.client) and post.over_18 and not (v and v.over_18) and not session.get('over_18_cookies', 0) >= int(time.time()):
|
||||
|
|
Loading…
Reference in New Issue