Merge branch 'service-actor-outbox' into 'develop'
ap userview: add outbox field. See merge request pleroma/pleroma!4002
This commit is contained in:
commit
7622a83973
1
changelog.d/add-outbox.fix
Normal file
1
changelog.d/add-outbox.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
ap userview: add outbox field.
|
@ -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.",
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user