Limit activity types accepted to outbox to only 'Create'

This commit is contained in:
sxsdv1 2018-12-29 18:22:40 +01:00
parent 569bad8210
commit 1e781715c8

View file

@ -165,7 +165,10 @@ def read_inbox(%{assigns: %{user: user}} = conn, %{"nickname" => nickname} = par
end end
end end
def update_outbox(%{assigns: %{user: user}} = conn, %{"nickname" => nickname} = params) do def update_outbox(
%{assigns: %{user: user}} = conn,
%{"nickname" => nickname, "type" => "Create"} = params
) do
if nickname == user.nickname do if nickname == user.nickname do
actor = user.ap_id() actor = user.ap_id()