DEV: Plugin instance method for push_notification_filters (PR #14787)

GitHub

Just a thought but I was wondering if we can just return immediately within the block once a filter returns false.

Just want to confirm that this doesn’t leak the filter across tests and there is code somewhere the cleans this up after the test run?

      next unless filter.call(user, payload)

You probably don’t want return here which is the scope above the block.

@eviltrout I actually do want to return; this is the mechanism to block notifications from being sent; all filters must pass or the notification is not sent.

1 Like

My bad! I thought this callback was something different.