aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-09-15 12:21:38 +0000
committerrinpatch <rinpatch@sdf.org>2020-09-17 19:49:08 +0300
commitbb70b231d023c6e9f998a6be58f66ae3ff603157 (patch)
tree3e2bfe4fd507533a11f75bc20387fc228bcbe217 /lib
parent22d49993d9ab35ff5d5276a6a1f4aec96d03b7f3 (diff)
downloadpleroma-bb70b231d023c6e9f998a6be58f66ae3ff603157.tar.gz
Merge branch 'reply-visibility-user-guard' into 'develop'
Mastodon API: fix the public timeline returning an error when the `reply_visibility` parameter is set to `self` for an unauthenticated user See merge request pleroma/pleroma!2999
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 624a508ae..e4eafc8ac 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -744,7 +744,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(
@@ -760,7 +760,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(