Serve non-public activities in /api/v1/favourites

Fixes #648
This commit is contained in:
rinpatch 2019-03-25 02:15:45 +03:00
parent a32bcab04b
commit a7f58b3c13

View file

@ -944,12 +944,14 @@ def account_search(%{assigns: %{user: user}} = conn, %{"q" => query} = params) d
end end
def favourites(%{assigns: %{user: user}} = conn, params) do def favourites(%{assigns: %{user: user}} = conn, params) do
activities = params =
params params
|> Map.put("type", "Create") |> Map.put("type", "Create")
|> Map.put("favorited_by", user.ap_id) |> Map.put("favorited_by", user.ap_id)
|> Map.put("blocking_user", user) |> Map.put("blocking_user", user)
|> ActivityPub.fetch_public_activities()
activities =
ActivityPub.fetch_activities([], params)
|> Enum.reverse() |> Enum.reverse()
conn conn