Merge branch 'service-actor-outbox' into 'develop'

ap userview: add outbox field.

See merge request pleroma/pleroma!4002
This commit is contained in:
lain 2023-12-15 06:22:55 +00:00
commit 7622a83973
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1 @@
ap userview: add outbox field.

View File

@ -46,6 +46,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
"following" => "#{user.ap_id}/following", "following" => "#{user.ap_id}/following",
"followers" => "#{user.ap_id}/followers", "followers" => "#{user.ap_id}/followers",
"inbox" => "#{user.ap_id}/inbox", "inbox" => "#{user.ap_id}/inbox",
"outbox" => "#{user.ap_id}/outbox",
"name" => "Pleroma", "name" => "Pleroma",
"summary" => "summary" =>
"An internal service actor for this Pleroma instance. No user-serviceable parts inside.", "An internal service actor for this Pleroma instance. No user-serviceable parts inside.",

View File

@ -76,6 +76,15 @@ defmodule Pleroma.Web.ActivityPub.UserViewTest do
assert %{"invisible" => true} = UserView.render("service.json", %{user: user}) assert %{"invisible" => true} = UserView.render("service.json", %{user: user})
end end
test "service has a few essential fields" do
user = insert(:user)
result = UserView.render("service.json", %{user: user})
assert result["id"]
assert result["type"] == "Application"
assert result["inbox"]
assert result["outbox"]
end
test "renders AKAs" do test "renders AKAs" do
akas = ["https://i.tusooa.xyz/users/test-pleroma"] akas = ["https://i.tusooa.xyz/users/test-pleroma"]
user = insert(:user, also_known_as: akas) user = insert(:user, also_known_as: akas)