Make credo happy
authorThibaut Girka <thib@sitedethib.com>
Wed, 2 Oct 2019 11:46:06 +0000 (13:46 +0200)
committerThibaut Girka <thib@sitedethib.com>
Sat, 5 Oct 2019 11:56:40 +0000 (13:56 +0200)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 8f9bf5525ac6f4cd8b2e3f059f7b792dbe158a85..449c777dcc79d0a5524de3a73aff45f3a3217c10 100644 (file)
@@ -782,16 +782,16 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
   end
 
   @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
       })
-      when attributedTo == ap_id do
+      when attributed_to == ap_id do
     with {:ok, activity} <-
            handle_incoming(%{
              "type" => "Create",
              "to" => data["to"],
              "cc" => data["cc"],
-             "actor" => data["attributedTo"],
+             "actor" => attributed_to,
              "object" => data
            }) do
       {:ok, Object.normalize(activity)}