Apply suggestion to lib/pleroma/notification.ex

This commit is contained in:
lain 2020-06-29 16:04:14 +00:00
parent c01f4ca07f
commit 09c5991f82

View File

@ -367,7 +367,7 @@ defp do_create_notifications(%Activity{} = activity, options) do
do_send = do_send && user in enabled_receivers
create_notification(activity, user, do_send)
end)
|> Enum.filter(& &1)
|> Enum.reject(&is_nil/1)
{:ok, notifications}
end