Fix fetching post from another takahe by searching its url (#661)
This commit is contained in:
parent
ae1bfc49a7
commit
b122e2beda
|
@ -82,7 +82,11 @@ class SearchService:
|
||||||
if response.status_code >= 400:
|
if response.status_code >= 400:
|
||||||
return None
|
return None
|
||||||
content_type = response.headers.get("Content-Type", "").lower()
|
content_type = response.headers.get("Content-Type", "").lower()
|
||||||
if content_type not in ["application/json", "application/ld+json"]:
|
if content_type not in [
|
||||||
|
"application/json",
|
||||||
|
"application/ld+json",
|
||||||
|
"application/activity+json",
|
||||||
|
]:
|
||||||
return None
|
return None
|
||||||
document = canonicalise(response.json(), include_security=True)
|
document = canonicalise(response.json(), include_security=True)
|
||||||
type = document.get("type", "unknown").lower()
|
type = document.get("type", "unknown").lower()
|
||||||
|
|
Loading…
Reference in New Issue