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:
parent
b5dc59c8fa
commit
6aa116eca7
14 changed files with 155 additions and 52 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue