Revert existing object check
authorKaren Konou <konoukaren@gmail.com>
Thu, 7 Mar 2019 10:53:15 +0000 (11:53 +0100)
committerKaren Konou <konoukaren@gmail.com>
Thu, 7 Mar 2019 10:53:15 +0000 (11:53 +0100)
lib/pleroma/web/activity_pub/activity_pub.ex

index 7e7a43c5556cde759818cd106eace8c2eb7366ef..98639883e071d2eb6462ccccc69a929abbedb63e 100644 (file)
@@ -311,14 +311,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     user = User.get_cached_by_ap_id(actor)
 
     to =
-      case Object.get_cached_by_ap_id(id) do
-        nil ->
-          [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
-
-        object ->
-          object.data["to"] || [] ++ object.data["cc"] ||
-            [] ++ [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
-      end
+      object.data["to"] || [] ++ object.data["cc"] ||
+        [] ++ [user.follower_address, "https://www.w3.org/ns/activitystreams#Public"]
 
     data = %{
       "type" => "Delete",