streamer: use direct object for filter checks when there is no valid child object...
authorAriadne Conill <ariadne@dereferenced.org>
Sun, 3 Nov 2019 15:05:12 +0000 (09:05 -0600)
committerlain <lain@soykaf.club>
Mon, 4 Nov 2019 15:25:05 +0000 (16:25 +0100)
commit6a151e7c7f90b0aea71580e613be4ddf5a4809f5
tree722588a407516e7dbdbc63d2c9235360929c15eb
parent5f844fd3f2b35075bd3a90c71315c321fec6a6e8
streamer: use direct object for filter checks when there is no valid child object in an activity

We call Object.normalize/1 to get the child object for situations like Announce.
However, the check is flawed and immediately fails if Object.normalize/1 fails.
Instead, we should use the activity itself in those cases to allow activities which
never have a child object to pass through the filter.

Closes #1291
lib/pleroma/web/streamer/worker.ex
test/web/streamer/streamer_test.exs