projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '1204-object-pruning-deletion' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
activity_pub_controller.ex
diff --git
a/lib/pleroma/web/activity_pub/activity_pub_controller.ex
b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
index e68d0763e99140da64af86f0736d66354b6fbf8a..62ad15d85ba929f6cf51522085ceeb4f9483f41b 100644
(file)
--- a/
lib/pleroma/web/activity_pub/activity_pub_controller.ex
+++ b/
lib/pleroma/web/activity_pub/activity_pub_controller.ex
@@
-34,12
+34,13
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubController do
plug(
EnsureAuthenticatedPlug,
plug(
EnsureAuthenticatedPlug,
- [unless_func: &FederatingPlug.federating?/
0
] when action not in @federating_only_actions
+ [unless_func: &FederatingPlug.federating?/
1
] when action not in @federating_only_actions
)
)
+ # Note: :following and :followers must be served even without authentication (as via :api)
plug(
EnsureAuthenticatedPlug
plug(
EnsureAuthenticatedPlug
- when action in [:read_inbox, :update_outbox, :whoami, :upload_media
, :following, :followers
]
+ when action in [:read_inbox, :update_outbox, :whoami, :upload_media]
)
plug(
)
plug(
@@
-395,7
+396,10
@@
defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|> json(err)
end
|> json(err)
end
- defp handle_user_activity(%User{} = user, %{"type" => "Create"} = params) do
+ defp handle_user_activity(
+ %User{} = user,
+ %{"type" => "Create", "object" => %{"type" => "Note"}} = params
+ ) do
object =
params["object"]
|> Map.merge(Map.take(params, ["to", "cc"]))
object =
params["object"]
|> Map.merge(Map.take(params, ["to", "cc"]))