mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Tweak the remote follow
Previously, it was 500ing if the profile already started with an @
This commit is contained in:
parent
bdb25b85c2
commit
dae538196d
1 changed files with 4 additions and 3 deletions
7
app.py
7
app.py
|
@ -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}")
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue