make it possible to message someone by id

pull/171/head
Aevann 2023-07-11 15:30:44 +03:00
parent 2831ae0ccb
commit 718951f6a6
1 changed files with 3 additions and 3 deletions

View File

@ -732,11 +732,11 @@ def is_available(name:str):
else:
return {name: True}
@app.get("/id/<int:id>")
@app.route("/id/<int:id>/<path:path>")
@limiter.limit(DEFAULT_RATELIMIT)
def user_id(id):
def user_id(id, path):
user = get_account(id)
return redirect(user.url)
return redirect(f'/@{user.username}/{path}')
@app.get("/u/<username>")
@limiter.limit(DEFAULT_RATELIMIT)