diff --git a/drama/routes/users.py b/drama/routes/users.py index 33e585334..bdf5869c2 100644 --- a/drama/routes/users.py +++ b/drama/routes/users.py @@ -322,16 +322,30 @@ def u_username(username, v=None): listing = get_posts(ids, v=v) if u.unban_utc: - if request.headers.get("Authorization"): return {"data": [x.json for x in listing]} + if request.headers.get("Authorization"): {"data": [x.json for x in listing]} else: return render_template("userpage.html", - u=u, - v=v, - listing=listing, - page=page, - sort=sort, - t=t, - next_exists=next_exists, - is_following=(v and u.has_follower(v))) + unban=u.unban_string, + u=u, + v=v, + listing=listing, + page=page, + sort=sort, + t=t, + next_exists=next_exists, + is_following=(v and u.has_follower(v))) + + + + if request.headers.get("Authorization"): return {"data": [x.json for x in listing]} + else: return render_template("userpage.html", + u=u, + v=v, + listing=listing, + page=page, + sort=sort, + t=t, + next_exists=next_exists, + is_following=(v and u.has_follower(v)))