report notifications for privileged users

Instead of `Pleroma.User.all_superusers()` we now use `Pleroma.User.all_superusers(:report_handle)`

I also changed it for sending emails, but there were no tests.
This commit is contained in:
Ilja 2022-06-19 16:26:56 +02:00
commit e21ef5aef3
4 changed files with 21 additions and 12 deletions

View file

@ -542,7 +542,8 @@ defmodule Pleroma.Notification do
end
def get_potential_receiver_ap_ids(%{data: %{"type" => "Flag", "actor" => actor}}) do
(User.all_superusers() |> Enum.map(fn user -> user.ap_id end)) -- [actor]
(User.all_users_with_privilege(:report_handle) |> Enum.map(fn user -> user.ap_id end)) --
[actor]
end
def get_potential_receiver_ap_ids(activity) do