mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 00:30:59 +00:00
Fix fetching post from another takahe by searching its url (#661)
This commit is contained in:
parent
ae1bfc49a7
commit
b122e2beda
1 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue