aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/notification.ex
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2021-02-03 12:32:44 -0600
committerMark Felder <feld@feld.me>2021-02-03 12:32:44 -0600
commit76f732766ba36c3a94cf6b8b39fb745c1cf3f49a (patch)
tree76afc0298d8e6ae303479fc711bced5ae9c51cce /lib/pleroma/notification.ex
parenta7864a94295eedaee1c2ad0829c9b668c7acd705 (diff)
downloadpleroma-76f732766ba36c3a94cf6b8b39fb745c1cf3f49a.tar.gz
Exclude reporter from receiving notifications from their own reports.
Currently only works if the reporting actor is an admin, but if we include moderators with those who receive notification reports it will work for them.
Diffstat (limited to 'lib/pleroma/notification.ex')
-rw-r--r--lib/pleroma/notification.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
index 55b513212..1970fbf65 100644
--- a/lib/pleroma/notification.ex
+++ b/lib/pleroma/notification.ex
@@ -507,8 +507,8 @@ defmodule Pleroma.Notification do
[object_id]
end
- def get_potential_receiver_ap_ids(%{data: %{"type" => "Flag"}}) do
- User.all_superusers() |> Enum.map(fn user -> user.ap_id 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]
end
def get_potential_receiver_ap_ids(activity) do