alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.ActivityPub.Publisher
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.CommonAPI
private_activity_1 = Activity.get_by_ap_id_with_object(private_activity_1.data["id"])
- assert [public_activity, private_activity_1, private_activity_3] ==
- activities
+ assert [public_activity, private_activity_1, private_activity_3] == activities
assert length(activities) == 3
actor = insert(:user)
inbox = "http://200.site/users/nick1/inbox"
- assert {:ok, _} = ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
+ assert {:ok, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_reachable(inbox))
end
inbox = "http://200.site/users/nick1/inbox"
assert {:ok, _} =
- ActivityPub.publish_one(%{
+ Publisher.publish_one(%{
inbox: inbox,
json: "{}",
actor: actor,
inbox = "http://200.site/users/nick1/inbox"
assert {:ok, _} =
- ActivityPub.publish_one(%{
+ Publisher.publish_one(%{
inbox: inbox,
json: "{}",
actor: actor,
actor = insert(:user)
inbox = "http://404.site/users/nick1/inbox"
- assert {:error, _} =
- ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
+ assert {:error, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_unreachable(inbox))
end
actor = insert(:user)
inbox = "http://connrefused.site/users/nick1/inbox"
- assert {:error, _} =
- ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
+ assert {:error, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_unreachable(inbox))
end
actor = insert(:user)
inbox = "http://200.site/users/nick1/inbox"
- assert {:ok, _} = ActivityPub.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
+ assert {:ok, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
refute called(Instances.set_unreachable(inbox))
end
inbox = "http://connrefused.site/users/nick1/inbox"
assert {:error, _} =
- ActivityPub.publish_one(%{
+ Publisher.publish_one(%{
inbox: inbox,
json: "{}",
actor: actor,