Mastodon API: fix the public timeline returning an error when the reply_visibility parameter is set to self for an unauthenticated user

This commit is contained in:
eugenijm 2020-09-15 13:00:07 +03:00
commit 3ab59a6f3c
3 changed files with 11 additions and 2 deletions

View file

@ -767,7 +767,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
defp restrict_replies(query, %{
reply_filtering_user: user,
reply_filtering_user: %User{} = user,
reply_visibility: "self"
}) do
from(
@ -783,7 +783,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
defp restrict_replies(query, %{
reply_filtering_user: user,
reply_filtering_user: %User{} = user,
reply_visibility: "following"
}) do
from(