Get objects that people you know favorite.
authorlain <lain@soykaf.club>
Thu, 22 Feb 2018 08:02:34 +0000 (09:02 +0100)
committerlain <lain@soykaf.club>
Thu, 22 Feb 2018 08:02:34 +0000 (09:02 +0100)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 395436c5c9ee81b90ea0dd5f77366d3c691dc87b..a845d64b5551ef3c55ca503a89f39e6275b35a90 100644 (file)
@@ -81,7 +81,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
 
   def handle_incoming(%{"type" => "Like", "object" => object_id, "actor" => actor, "id" => id} = data) do
     with %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
-         %Object{} = object <- Object.get_by_ap_id(object_id),
+         {:ok, object} <- get_obj_helper(object_id) || ActivityPub.fetch_object_from_id(object_id),
          {:ok, activity, object} <- ActivityPub.like(actor, object, id, false) do
       {:ok, activity}
     else