mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 15:14:42 +00:00
Make credo happy
This commit is contained in:
parent
977e711e22
commit
791d93ff0e
1 changed files with 3 additions and 3 deletions
|
@ -782,16 +782,16 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec get_embedded_obj_helper(String.t() | Object.t(), User.t()) :: {:ok, Object.t()} | nil
|
@spec get_embedded_obj_helper(String.t() | Object.t(), User.t()) :: {:ok, Object.t()} | nil
|
||||||
def get_embedded_obj_helper(%{"attributedTo" => attributedTo, "id" => object_id} = data, %User{
|
def get_embedded_obj_helper(%{"attributedTo" => attributed_to, "id" => object_id} = data, %User{
|
||||||
ap_id: ap_id
|
ap_id: ap_id
|
||||||
})
|
})
|
||||||
when attributedTo == ap_id do
|
when attributed_to == ap_id do
|
||||||
with {:ok, activity} <-
|
with {:ok, activity} <-
|
||||||
handle_incoming(%{
|
handle_incoming(%{
|
||||||
"type" => "Create",
|
"type" => "Create",
|
||||||
"to" => data["to"],
|
"to" => data["to"],
|
||||||
"cc" => data["cc"],
|
"cc" => data["cc"],
|
||||||
"actor" => data["attributedTo"],
|
"actor" => attributed_to,
|
||||||
"object" => data
|
"object" => data
|
||||||
}) do
|
}) do
|
||||||
{:ok, Object.normalize(activity)}
|
{:ok, Object.normalize(activity)}
|
||||||
|
|
Loading…
Reference in a new issue