output repeats at ActivityPub outbox
authorHakaba Hitoyo <example@example.com>
Sat, 26 May 2018 05:02:57 +0000 (14:02 +0900)
committerHakaba Hitoyo <example@example.com>
Sat, 26 May 2018 05:02:57 +0000 (14:02 +0900)
lib/pleroma/web/activity_pub/views/user_view.ex

index ffd76b5294ecaf501e056f6f451e10fc280d785b..011ae18a35877478c28067c99b799148af969086 100644 (file)
@@ -98,9 +98,6 @@ defmodule Pleroma.Web.ActivityPub.UserView do
     info = User.user_info(user)
 
     params = %{
-      "type" => ["Create", "Announce"],
-      "actor_id" => user.ap_id,
-      "whole_db" => true,
       "limit" => "10"
     }
 
@@ -111,10 +108,8 @@ defmodule Pleroma.Web.ActivityPub.UserView do
         params
       end
 
-    activities = ActivityPub.fetch_public_activities(params)
-    min_id = Enum.at(activities, 0).id
-
-    activities = Enum.reverse(activities)
+    activities = ActivityPub.fetch_public_activities(user, nil, params)
+    min_id = Enum.at(Enum.reverse(activities), 0).id
     max_id = Enum.at(activities, 0).id
 
     collection =