alias Pleroma.Repo
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
+ alias Pleroma.Web.ActivityPub.Visibility
import Ecto.Query
if not User.locked?(followed) do
ActivityPub.accept(%{
to: [follower.ap_id],
- actor: followed.ap_id,
+ actor: followed,
object: data,
local: true
})
ActivityPub.accept(%{
to: follow_activity.data["to"],
type: "Accept",
- actor: followed.ap_id,
+ actor: followed,
object: follow_activity.data["id"],
local: false
}) do
ActivityPub.reject(%{
to: follow_activity.data["to"],
type: "Reject",
- actor: followed.ap_id,
+ actor: followed,
object: follow_activity.data["id"],
local: false
}) do
with actor <- get_actor(data),
%User{} = actor <- User.get_or_fetch_by_ap_id(actor),
{:ok, object} <- get_obj_helper(object_id) || fetch_obj_helper(object_id),
- public <- ActivityPub.is_public?(data),
+ public <- Visibility.is_public?(data),
{:ok, activity, _object} <- ActivityPub.announce(actor, object, id, false, public) do
{:ok, activity}
else