From b122e2beda43955b778e214b9f244a664efc7cc4 Mon Sep 17 00:00:00 2001 From: Henri Dickson <90480431+alphatownsman@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:03:51 -0500 Subject: [PATCH] Fix fetching post from another takahe by searching its url (#661) --- activities/services/search.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/activities/services/search.py b/activities/services/search.py index cbac286..35c5e80 100644 --- a/activities/services/search.py +++ b/activities/services/search.py @@ -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()