CommonAPI: Use common pipeline for deletions.
This commit is contained in:
parent
c9bfa51ea9
commit
fdd8e7f276
2 changed files with 6 additions and 4 deletions
|
|
@ -77,8 +77,8 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
{:find_activity, Activity.get_by_id_with_object(activity_id)},
|
||||
%Object{} = object <- Object.normalize(activity),
|
||||
true <- User.superuser?(user) || user.ap_id == object.data["actor"],
|
||||
{:ok, _} <- unpin(activity_id, user),
|
||||
{:ok, delete} <- ActivityPub.delete(object) do
|
||||
{:ok, delete_data, _} <- Builder.delete(user, object.data["id"]),
|
||||
{:ok, delete, _} <- Pipeline.common_pipeline(delete_data, local: true) do
|
||||
{:ok, delete}
|
||||
else
|
||||
{:find_activity, _} -> {:error, :not_found}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue