projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/notifs-exclude-blocked-from-with-muted' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
controllers
/
timeline_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex
index bb8b0eb328bad899415df0d3fcb3ced0d19c8bbd..9f086a8c2f40d31a2f22acab8ada32dc97c585a0 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex
@@
-9,8
+9,14
@@
defmodule Pleroma.Web.MastodonAPI.TimelineController do
only: [add_link_headers: 2, add_link_headers: 3, truthy_param?: 1]
alias Pleroma.Pagination
only: [add_link_headers: 2, add_link_headers: 3, truthy_param?: 1]
alias Pleroma.Pagination
+ alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.ActivityPub
+ plug(OAuthScopesPlug, %{scopes: ["read:statuses"]} when action in [:home, :direct])
+ plug(OAuthScopesPlug, %{scopes: ["read:lists"]} when action == :list)
+
+ plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug)
+
plug(:put_view, Pleroma.Web.MastodonAPI.StatusView)
# GET /api/v1/timelines/home
plug(:put_view, Pleroma.Web.MastodonAPI.StatusView)
# GET /api/v1/timelines/home