Skip to content

Commit

Permalink
Fix fetching post from another takahe by searching its url (jointakah…
Browse files Browse the repository at this point in the history
  • Loading branch information
alphatownsman authored Nov 19, 2023
1 parent ae1bfc4 commit b122e2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion activities/services/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ def search_url(self) -> Post | Identity | None:
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()
Expand Down

0 comments on commit b122e2b

Please sign in to comment.