Merge branch '2236-no-name' into 'develop'

Resolve "Account cannot be fetched by some instances"

Closes #2236

See merge request pleroma/pleroma!3101
This commit is contained in:
Haelwenn 2020-10-27 22:44:31 +00:00
commit d8d4bd15d0
5 changed files with 63 additions and 3 deletions

View file

@ -2273,4 +2273,15 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
assert length(activities) == 2
end
end
test "allow fetching of accounts with an empty string name field" do
Tesla.Mock.mock(fn
%{method: :get, url: "https://princess.cat/users/mewmew"} ->
file = File.read!("test/fixtures/mewmew_no_name.json")
%Tesla.Env{status: 200, body: file}
end)
{:ok, user} = ActivityPub.make_user_from_ap_id("https://princess.cat/users/mewmew")
assert user.name == " "
end
end