Remove 'unlisted' handling for now.
authorlain <lain@soykaf.club>
Sun, 13 May 2018 10:07:11 +0000 (12:07 +0200)
committerlain <lain@soykaf.club>
Sun, 13 May 2018 10:07:11 +0000 (12:07 +0200)
It's just too slow (over 1 second on small systems, haven't looked at
the queries in detail yet). We'll need some other way to handle it.

lib/pleroma/web/activity_pub/activity_pub.ex
test/web/activity_pub/activity_pub_test.exs

index 491ad370592faacfeeabe39ec30aee1a8a0c0df7..4bd56d12312960d5183c1c5d9c4b2af2b71821b7 100644 (file)
@@ -233,7 +233,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
     q = fetch_activities_query(["https://www.w3.org/ns/activitystreams#Public"], opts)
 
     q
-    |> restrict_unlisted()
+    # Too slow
+    # |> restrict_unlisted()
     |> Repo.all()
     |> Enum.reverse()
   end
index a39ba9adb1d2c7a94a93a149701bae492a497e16..c4b59f5c7739a62574b8bf9d5ecc0593547153cf 100644 (file)
@@ -171,6 +171,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
   end
 
   describe "public fetch activities" do
+    @tag :skip
     test "doesn't retrieve unlisted activities" do
       user = insert(:user)
       {:ok, unlisted_activity} = CommonAPI.post(user, %{"status" => "yeah", "visibility" => "unlisted"})