Serve non-public activities in /api/v1/favourites
authorrinpatch <rinpatch@sdf.org>
Sun, 24 Mar 2019 23:15:45 +0000 (02:15 +0300)
committerrinpatch <rinpatch@sdf.org>
Sun, 24 Mar 2019 23:15:45 +0000 (02:15 +0300)
Fixes #648

lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index 2eb1da56180ff9f453f0bdb048b664f99aa87a8f..6be0f2bafdcd6b3d563a05e4effa48f6e17bc2b3 100644 (file)
@@ -944,12 +944,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
   end
 
   def favourites(%{assigns: %{user: user}} = conn, params) do
-    activities =
+    params =
       params
       |> Map.put("type", "Create")
       |> Map.put("favorited_by", user.ap_id)
       |> Map.put("blocking_user", user)
-      |> ActivityPub.fetch_public_activities()
+
+    activities =
+      ActivityPub.fetch_activities([], params)
       |> Enum.reverse()
 
     conn