mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-14 03:11:46 +00:00
Further search fixing
This commit is contained in:
parent
45de0e09b5
commit
f5f74dc150
2 changed files with 4 additions and 1 deletions
|
@ -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 a new issue