forked from rDrama/rDrama
fix prev commit
parent
cd60a11180
commit
d1e35e4afe
|
@ -661,15 +661,13 @@ def u_username(username, v=None):
|
||||||
if not u.is_visible_to(v):
|
if not u.is_visible_to(v):
|
||||||
if g.is_api_or_xhr or request.path.endswith(".json"):
|
if g.is_api_or_xhr or request.path.endswith(".json"):
|
||||||
abort(403, "This userpage is private")
|
abort(403, "This userpage is private")
|
||||||
|
return render_template("userpage_private.html", u=u, v=v), 403
|
||||||
return render_template("userpage_private.html", u=u, v=v)
|
|
||||||
|
|
||||||
|
|
||||||
if v and hasattr(u, 'is_blocking') and u.is_blocking:
|
if v and hasattr(u, 'is_blocking') and u.is_blocking:
|
||||||
if g.is_api_or_xhr or request.path.endswith(".json"):
|
if g.is_api_or_xhr or request.path.endswith(".json"):
|
||||||
abort(403, f"You are blocking @{u.username}.")
|
abort(403, f"You are blocking @{u.username}.")
|
||||||
|
return render_template("userpage_blocking.html", u=u, v=v), 403
|
||||||
return render_template("userpage_blocking.html", u=u, v=v)
|
|
||||||
|
|
||||||
|
|
||||||
sort = request.values.get("sort", "new")
|
sort = request.values.get("sort", "new")
|
||||||
|
|
Loading…
Reference in New Issue