1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2026-02-15 17:16:57 +00:00

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.
This commit is contained in:
Phantasm 2025-12-03 23:37:46 +01:00
parent 2b76243ec8
commit 7f3b3c2491
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8

View file

@ -489,8 +489,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
{:ok, activity} {:ok, activity}
else else
{:normalize, _} -> {:normalize, _} ->
if user.local and type == "Create" do if type in ["Create", "Listen"] do
# Creating new object via C2S # Creating new object via C2S; user is local and authenticated
# via the :authenticate Plug pipeline.
{:ok, activity} {:ok, activity}
else else
{:error, "No such object found"} {:error, "No such object found"}