alias Pleroma.Web.{WebFinger, Websub}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
+ alias Pleroma.Web.ActivityPub.Utils
require Logger
@websub Application.get_env(:pleroma, :websub)
@federating Keyword.get(@instance, :federating)
@max_jobs 20
+ def init(args) do
+ {:ok, args}
+ end
+
def start_link do
spawn(fn ->
# 1 minute
def handle(:incoming_ap_doc, params) do
Logger.info("Handling incoming AP activity")
+ params = Utils.normalize_params(params)
+
with {:ok, _user} <- ap_enabled_actor(params["actor"]),
nil <- Activity.get_by_ap_id(params["id"]),
{:ok, _activity} <- Transmogrifier.handle_incoming(params) do