From: rinpatch Date: Sun, 24 Mar 2019 23:15:45 +0000 (+0300) Subject: Serve non-public activities in /api/v1/favourites X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a7f58b3c13ae90ae9085a7837de3b2a549f4c225;p=akkoma Serve non-public activities in /api/v1/favourites Fixes #648 --- diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 2eb1da561..6be0f2baf 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -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