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)
committerAriadne Conill <ariadne@dereferenced.org>
Sun, 3 Nov 2019 15:05:12 +0000 (09:05 -0600)
commit4bf942583fdae27813f4af1f901c78eaff391b76
tree5d9377ad245ae1b92dab39d646dcb797b3c7a3d8
parent9d8da9ea1501203662e08b6814ac324415653f3e
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