mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-25 23:00:29 +00:00
Support acct with domain name in /api/v1/accounts/lookup (#412)
This commit is contained in:
parent
21d565d282
commit
7f23ae5f52
1 changed files with 1 additions and 1 deletions
|
@ -86,8 +86,8 @@ def lookup(request: HttpRequest, acct: str):
|
|||
Quickly lookup a username to see if it is available, skipping WebFinger
|
||||
resolution.
|
||||
"""
|
||||
acct = acct.lstrip("@")
|
||||
host = request.get_host()
|
||||
acct = acct.lstrip("@").removesuffix(f"@{host}")
|
||||
|
||||
identity = Identity.objects.filter(
|
||||
Q(domain__service_domain__iexact=host) | Q(domain__domain__iexact=host),
|
||||
|
|
Loading…
Reference in a new issue