diff options
author | lain <lain@soykaf.club> | 2020-09-15 12:21:38 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-09-17 19:49:08 +0300 |
commit | bb70b231d023c6e9f998a6be58f66ae3ff603157 (patch) | |
tree | 3e2bfe4fd507533a11f75bc20387fc228bcbe217 /lib | |
parent | 22d49993d9ab35ff5d5276a6a1f4aec96d03b7f3 (diff) | |
download | pleroma-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.ex | 4 |
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( |