Create activity handling: Flip it and reverse it

Both objects and create activities will now go through the common
pipeline and will be validated. Objects are now created as a side
effect of the Create activity, rolling back a transaction if it's
not possible to insert the object.
This commit is contained in:
lain 2020-04-28 16:26:19 +02:00
commit 6aa116eca7
14 changed files with 155 additions and 52 deletions

View file

@ -55,7 +55,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
data
|> Map.put("to", author.ap_id)
{:error, _} = Transmogrifier.handle_incoming(data)
assert match?({:error, _}, Transmogrifier.handle_incoming(data))
refute Object.get_by_ap_id(data["object"]["id"])
end
test "it inserts it and creates a chat" do