logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 1027d1f6963b495a5abc67b05447619ce7d429db
parent: a5c9dd0a2aa792ed075c6ff83b1de262a1529026
Author: lain <lain@soykaf.club>
Date:   Sun, 13 May 2018 12:07:11 +0200

Remove 'unlisted' handling for now.

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.

Diffstat:

Mlib/pleroma/web/activity_pub/activity_pub.ex3++-
Mtest/web/activity_pub/activity_pub_test.exs1+
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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 diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs @@ -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"})