commit: 7f3b3c249137dd0dc23a97c5f6a08a868a4ad294
parent 2b76243ec82f2c246264f2a1f655b975f12e7290
Author: Phantasm <phantasm@centrum.cz>
Date: Wed, 3 Dec 2025 23:37:46 +0100
AP C2S: remove check for local user since user is already authenticated
Before a request arrives to update_outbox, it already passed through out
Plug authentication (:authenticate), so at this point all users should
be local.
Also adds Listen Activities to the list of allowed Activities that don't
need an existing normalized object referenced in them.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
@@ -489,8 +489,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
{:ok, activity}
else
{:normalize, _} ->
- if user.local and type == "Create" do
- # Creating new object via C2S
+ if type in ["Create", "Listen"] do
+ # Creating new object via C2S; user is local and authenticated
+ # via the :authenticate Plug pipeline.
{:ok, activity}
else
{:error, "No such object found"}