diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2024-09-16 17:07:39 +0200 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2024-09-16 17:19:21 +0200 |
commit | e74e0089bf2943f925cbead14154f8b2fa207963 (patch) | |
tree | a8241b8075cc29468e1e6df3edbe4b437175ce7c /lib | |
parent | 8250a9764ea07a69a701401fd00f6d55e0ef2003 (diff) | |
download | pleroma-e74e0089bf2943f925cbead14154f8b2fa207963.tar.gz pleroma-e74e0089bf2943f925cbead14154f8b2fa207963.zip |
Repesct :restrict_unauthenticated for hashtag rss/atom feeds
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/feed/tag_controller.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/feed/tag_controller.ex b/lib/pleroma/web/feed/tag_controller.ex index e60767327..02d639296 100644 --- a/lib/pleroma/web/feed/tag_controller.ex +++ b/lib/pleroma/web/feed/tag_controller.ex @@ -10,7 +10,7 @@ defmodule Pleroma.Web.Feed.TagController do alias Pleroma.Web.Feed.FeedView def feed(conn, params) do - if Config.get!([:instance, :public]) do + if not Config.restrict_unauthenticated_access?(:timelines, :local) do render_feed(conn, params) else render_error(conn, :not_found, "Not found") @@ -18,10 +18,12 @@ defmodule Pleroma.Web.Feed.TagController do end defp render_feed(conn, %{"tag" => raw_tag} = params) do + local_only = Config.restrict_unauthenticated_access?(:timelines, :federated) + {format, tag} = parse_tag(raw_tag) activities = - %{type: ["Create"], tag: tag} + %{type: ["Create"], tag: tag, local_only: local_only} |> Pleroma.Maps.put_if_present(:max_id, params["max_id"]) |> ActivityPub.fetch_public_activities() |