Mastodon API: Fix private and direct statuses not being filtered out from the public timeline for an authenticated user (GET /api/v1/timelines/public)

This commit is contained in:
eugenijm 2019-09-20 17:54:38 +03:00
commit 7cf1252455
4 changed files with 21 additions and 3 deletions

View file

@ -520,9 +520,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
def fetch_public_activities(opts \\ %{}) do
q = fetch_activities_query([Pleroma.Constants.as_public()], opts)
opts = Map.drop(opts, ["user"])
q
[Pleroma.Constants.as_public()]
|> fetch_activities_query(opts)
|> restrict_unlisted()
|> Pagination.fetch_paginated(opts)
|> Enum.reverse()