diff options
Diffstat (limited to 'lib/pleroma/notification.ex')
-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 35f817d1d..00a382f31 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -46,9 +46,11 @@ defmodule Pleroma.Notification do # TODO move to sql, too. def create_notification(%Activity{} = activity, %User{} = user) do - notification = %Notification{user_id: user.id, activity_id: activity.id} - {:ok, notification} = Repo.insert(notification) - notification + unless User.blocks?(user, %{ap_id: activity.data["actor"]}) do + notification = %Notification{user_id: user.id, activity_id: activity.id} + {:ok, notification} = Repo.insert(notification) + notification + end end end |