diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/notification.ex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 9c7415f29..31544570f 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -471,9 +471,11 @@ defmodule Pleroma.Notification do end notifications = - Enum.map([actor | voters], fn ap_id -> - with %User{} = user <- User.get_by_ap_id(ap_id) do - create_notification(activity, user, type: "poll") + Enum.reduce([actor | voters], [], fn ap_id, acc -> + with %User{local: true} = user <- User.get_by_ap_id(ap_id) do + [create_notification(activity, user, type: "poll") | acc] + else + _ -> acc end end) |