Fix tootdon logins.
[akkoma] / lib / pleroma / notification.ex
index 35f817d1d48ade6734a52f4546942ca04fe39e8c..00a382f3184fe65e9106659cfe5a6e9f17970bb5 100644 (file)
@@ -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