Only add local posts to index in activity_pub
authorEkaterina Vaartis <vaartis@kotobank.ch>
Fri, 29 Oct 2021 18:04:59 +0000 (21:04 +0300)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Jun 2022 19:48:44 +0000 (20:48 +0100)
Remote ones are already added in another place

lib/pleroma/web/activity_pub/activity_pub.ex

index 5f068cef043ff42798ca139aee0d676ee6e411db..e6548a8188a535d35cdfc29763bcce96cd63e94b 100644 (file)
@@ -141,7 +141,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
       end)
 
       # Add local posts to search index
-      Pleroma.Search.add_to_index(activity)
+      if local, do: Pleroma.Search.add_to_index(activity)
 
       {:ok, activity}
     else