Create activity handling: Flip it and reverse it
authorlain <lain@soykaf.club>
Tue, 28 Apr 2020 14:26:19 +0000 (16:26 +0200)
committerlain <lain@soykaf.club>
Tue, 28 Apr 2020 14:26:19 +0000 (16:26 +0200)
commit6aa116eca7d6ef6567dcef03b8c776bd2134bf3f
tree60d1a53c276f03a01db4a8f095b666f5b9485afe
parentb5dc59c8fa587b4db844c7fc0ba16e5cb00bfd38
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.
14 files changed:
lib/pleroma/notification.ex
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/activity_pub/object_validator.ex
lib/pleroma/web/activity_pub/object_validators/chat_message_validator.ex
lib/pleroma/web/activity_pub/object_validators/create_chat_message_validator.ex
lib/pleroma/web/activity_pub/object_validators/types/safe_text.ex [new file with mode: 0644]
lib/pleroma/web/activity_pub/pipeline.ex
lib/pleroma/web/activity_pub/side_effects.ex
lib/pleroma/web/activity_pub/transmogrifier/chat_message_handling.ex
lib/pleroma/web/common_api/common_api.ex
lib/pleroma/web/common_api/utils.ex
test/web/activity_pub/object_validators/types/safe_text_test.exs [new file with mode: 0644]
test/web/activity_pub/side_effects_test.exs
test/web/activity_pub/transmogrifier/chat_message_test.exs