How to use Ash.Notifier.PubSub filter?

The docs say the filter takes a function with the Notification as the argument and must return a truthy or falsy value. Does it work like this?
publish :action, "topic" do
filter fn notification -> notification.data.status == :done end
end
publish :action, "topic" do
filter fn notification -> notification.data.status == :done end
end
Solution:
Yes that looks right to me
Jump to solution
1 Reply
Solution
ZachDaniel
ZachDaniel2w ago
Yes that looks right to me

Did you find this page helpful?