Further search fixing
This commit is contained in:
parent
45de0e09b5
commit
f5f74dc150
|
@ -26,7 +26,7 @@ class SearchService:
|
|||
return set()
|
||||
|
||||
# Try to fetch the user by handle
|
||||
handle = self.query.lstrip("@").lower()
|
||||
handle = self.query.lstrip("@")
|
||||
results: set[Identity] = set()
|
||||
if "@" in handle:
|
||||
username, domain = handle.split("@", 1)
|
||||
|
|
|
@ -535,6 +535,9 @@ class Identity(StatorModel):
|
|||
try:
|
||||
data = response.json()
|
||||
except ValueError:
|
||||
# Some servers return these with a 200 status code!
|
||||
if b"not found" in response.content.lower():
|
||||
return None, None
|
||||
raise ValueError(
|
||||
"JSON parse error fetching webfinger",
|
||||
response.content,
|
||||
|
|
Loading…
Reference in New Issue