Fix fetching post from another takahe by searching its url (#661)

This commit is contained in:
Henri Dickson 2023-11-18 23:03:51 -05:00 committed by GitHub
parent ae1bfc49a7
commit b122e2beda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,11 @@ class SearchService:
if response.status_code >= 400:
return None
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
document = canonicalise(response.json(), include_security=True)
type = document.get("type", "unknown").lower()