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:
parent
2b76243ec8
commit
7f3b3c2491
1 changed files with 3 additions and 2 deletions
|
|
@ -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"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue