ObjectView: do not fetch an object for its ID
authorHélène <pleroma-dev@helene.moe>
Sun, 11 Sep 2022 02:54:04 +0000 (04:54 +0200)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Sun, 11 Sep 2022 18:52:59 +0000 (19:52 +0100)
commite88f36f72b5317debafcc4209b91eb35ad8f0691
treebfc6816a6798ffffed013fde7df5fb9b1f044fab
parentdfba26a09c7def7c15135aa8cae1b91e40106bd3
ObjectView: do not fetch an object for its ID

Non-Create/Listen activities had their associated object field
normalized and fetched, but only to use their `id` field, which is both
slow and redundant. This also failed on Undo activities, which delete
the associated object/activity in database.

Undo activities will now render properly and database loads should
improve ever so slightly.
lib/pleroma/object.ex
lib/pleroma/web/activity_pub/views/object_view.ex
test/pleroma/web/activity_pub/views/object_view_test.exs