Side Effects: On undoing, put information about the undone object.

This commit is contained in:
Lain Soykaf 2020-07-24 14:40:22 +02:00
commit 3d13fb05f8
2 changed files with 11 additions and 2 deletions

View file

@ -174,6 +174,10 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
def handle(%{data: %{"type" => "Undo", "object" => undone_object}} = object, meta) do
with undone_object <- Activity.get_by_ap_id(undone_object),
:ok <- handle_undoing(undone_object) do
meta =
meta
|> Keyword.put(:embedded_object, undone_object.data)
{:ok, object, meta}
end
end