projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma]
/
lib
/
pleroma
/
web
/
feed
/
tag_controller.ex
diff --git
a/lib/pleroma/web/feed/tag_controller.ex
b/lib/pleroma/web/feed/tag_controller.ex
index 3404d2856159cc16af50a39377f329a0bb5667ae..93a8294b7b49ba88968e693e8121597eb1db6742 100644
(file)
--- a/
lib/pleroma/web/feed/tag_controller.ex
+++ b/
lib/pleroma/web/feed/tag_controller.ex
@@
-9,14
+9,20
@@
defmodule Pleroma.Web.Feed.TagController do
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.Feed.FeedView
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.Feed.FeedView
- import Pleroma.Web.ControllerHelper, only: [put_if_exist: 3]
+ def feed(conn, params) do
+ unless Pleroma.Config.restrict_unauthenticated_access?(:activities, :local) do
+ render_feed(conn, params)
+ else
+ render_error(conn, :not_found, "Not found")
+ end
+ end
- def feed(conn, %{"tag" => raw_tag} = params) do
+ def
render_
feed(conn, %{"tag" => raw_tag} = params) do
{format, tag} = parse_tag(raw_tag)
activities =
%{type: ["Create"], tag: tag}
{format, tag} = parse_tag(raw_tag)
activities =
%{type: ["Create"], tag: tag}
- |>
put_if_exis
t(:max_id, params["max_id"])
+ |>
Pleroma.Maps.put_if_presen
t(:max_id, params["max_id"])
|> ActivityPub.fetch_public_activities()
conn
|> ActivityPub.fetch_public_activities()
conn