mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-23 01:35:28 +00:00
Drop obsolete pixelfed workaround
This pixelfed issue was fixed in 2022-12 in https://github.com/pixelfed/pixelfed/pull/3932 Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
This commit is contained in:
parent
8684964c5d
commit
61ec592d66
|
@ -348,10 +348,6 @@ defmodule Pleroma.Object.Fetcher do
|
||||||
{"ld+json", %{"profile" => "https://www.w3.org/ns/activitystreams"}} ->
|
{"ld+json", %{"profile" => "https://www.w3.org/ns/activitystreams"}} ->
|
||||||
{:ok, final_id, body}
|
{:ok, final_id, body}
|
||||||
|
|
||||||
# pixelfed sometimes (and only sometimes) responds with http instead of https
|
|
||||||
{"ld+json", %{"profile" => "http://www.w3.org/ns/activitystreams"}} ->
|
|
||||||
{:ok, final_id, body}
|
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
{:error, {:content_type, content_type}}
|
{:error, {:content_type, content_type}}
|
||||||
end
|
end
|
||||||
|
|
|
@ -773,23 +773,6 @@ defmodule Pleroma.Object.FetcherTest do
|
||||||
end)
|
end)
|
||||||
|
|
||||||
assert {:ok, _, "{}"} = Fetcher.get_object("https://mastodon.social/2")
|
assert {:ok, _, "{}"} = Fetcher.get_object("https://mastodon.social/2")
|
||||||
|
|
||||||
Tesla.Mock.mock(fn
|
|
||||||
%{
|
|
||||||
method: :get,
|
|
||||||
url: "https://mastodon.social/2"
|
|
||||||
} ->
|
|
||||||
%Tesla.Env{
|
|
||||||
status: 200,
|
|
||||||
headers: [
|
|
||||||
{"content-type",
|
|
||||||
"application/ld+json; profile=\"http://www.w3.org/ns/activitystreams\""}
|
|
||||||
],
|
|
||||||
body: "{}"
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
|
|
||||||
assert {:ok, _, "{}"} = Fetcher.get_object("https://mastodon.social/2")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should not return ok with other content types" do
|
test "should not return ok with other content types" do
|
||||||
|
|
Loading…
Reference in a new issue