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

pull/659/head^2
Henri Dickson 2023-11-18 23:03:51 -05:00 zatwierdzone przez GitHub
rodzic ae1bfc49a7
commit b122e2beda
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -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()