Tweak the remote follow

Previously, it was 500ing if the profile already started with an @
This commit is contained in:
Thomas Sileo 2018-06-22 00:23:05 +02:00
parent bdb25b85c2
commit dae538196d

7
app.py
View file

@ -364,10 +364,11 @@ def remote_follow():
return render_template("remote_follow.html")
csrf.protect()
profile = request.form.get("profile")
if not profile.startswith("@"):
profile = f"@{profile}"
return redirect(
get_remote_follow_template("@" + request.form.get("profile")).format(
uri=f"{USERNAME}@{DOMAIN}"
)
get_remote_follow_template(profile).format(uri=f"{USERNAME}@{DOMAIN}")
)