Support acct with domain name in /api/v1/accounts/lookup (#412)
This commit is contained in:
parent
21d565d282
commit
7f23ae5f52
|
@ -86,8 +86,8 @@ def lookup(request: HttpRequest, acct: str):
|
||||||
Quickly lookup a username to see if it is available, skipping WebFinger
|
Quickly lookup a username to see if it is available, skipping WebFinger
|
||||||
resolution.
|
resolution.
|
||||||
"""
|
"""
|
||||||
acct = acct.lstrip("@")
|
|
||||||
host = request.get_host()
|
host = request.get_host()
|
||||||
|
acct = acct.lstrip("@").removesuffix(f"@{host}")
|
||||||
|
|
||||||
identity = Identity.objects.filter(
|
identity = Identity.objects.filter(
|
||||||
Q(domain__service_domain__iexact=host) | Q(domain__domain__iexact=host),
|
Q(domain__service_domain__iexact=host) | Q(domain__domain__iexact=host),
|
||||||
|
|
Loading…
Reference in New Issue