Transmogrifier: For follows, create notifications last.
authorlain <lain@soykaf.club>
Fri, 5 Jun 2020 10:26:07 +0000 (12:26 +0200)
committerlain <lain@soykaf.club>
Fri, 5 Jun 2020 10:26:07 +0000 (12:26 +0200)
commit0efa8aa0b9567f42b1af63e2b93a9c51e9a0fb11
tree2a2311e2b91d7d81878c7576d71edde2947e4282
parentcc8a7dc205a4516452c48659e6bf081f3f730496
Transmogrifier: For follows, create notifications last.

As the notification type changes depending on the follow state,
the notification should not be created and streamed out before the
state settles. For this reason, the notification creation has been
delayed until it's clear if the user has been followed or not.

This is a bit hacky but it will be properly rewritten using the
pipeline soon.
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/activity_pub/transmogrifier.ex
test/web/activity_pub/transmogrifier/follow_handling_test.exs