This commit is contained in:
Aevann1 2022-04-18 19:51:39 +02:00
parent 0f84e6033e
commit 5d73bb34e8
2 changed files with 6 additions and 6 deletions

View file

@ -93,10 +93,10 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
except: abort(404)
post = get_post(pid, v=v)
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
if request.headers.get("Authorization"): return {'error': 'This content is not suitable for some users and situations.'}
else: render_template("errors/nsfw.html", v=v)
else: return render_template("errors/nsfw.html", v=v)
try: context = min(int(request.values.get("context", 0)), 8)
except: context = 0