SideEffects: Use Object.normalize to get the object.
authorlain <lain@soykaf.club>
Tue, 28 Apr 2020 11:43:58 +0000 (13:43 +0200)
committerlain <lain@soykaf.club>
Tue, 28 Apr 2020 11:43:58 +0000 (13:43 +0200)
lib/pleroma/web/activity_pub/side_effects.ex

index ebe3071b08fc55ffe48dd5225ed950a517654489..a2b4da8d6bccbc8fa8a8c87c98caf00b3d487d72 100644 (file)
@@ -30,8 +30,8 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
     result
   end
 
-  def handle(%{data: %{"type" => "Create", "object" => object_id}} = activity, meta) do
-    object = Object.get_by_ap_id(object_id)
+  def handle(%{data: %{"type" => "Create"}} = activity, meta) do
+    object = Object.normalize(activity, false)
 
     {:ok, _object} = handle_object_creation(object)