activitypub: normalize the actor to ensure we have its URI
This commit is contained in:
parent
1d4bbec6b3
commit
4d2c6707c2
4 changed files with 24 additions and 4 deletions
|
|
@ -5,6 +5,7 @@ defmodule Pleroma.Web.Federator do
|
|||
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)
|
||||
|
|
@ -91,6 +92,8 @@ defmodule Pleroma.Web.Federator do
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue