it works!!
[akkoma] / lib / pleroma / notification.ex
index 2364d36da0a4a03f43018b17b9e9d114bd821389..d05708e41eb2aaf988e73d067a276ece87b26af8 100644 (file)
@@ -6,6 +6,7 @@ defmodule Pleroma.Notification do
   use Ecto.Schema
   alias Pleroma.{User, Activity, Notification, Repo}
   alias Pleroma.Web.CommonAPI.Utils
+  alias Pleroma.Web.ThreadMute
   import Ecto.Query
 
   schema "notifications" do
@@ -112,6 +113,7 @@ defmodule Pleroma.Notification do
   # TODO move to sql, too.
   def create_notification(%Activity{} = activity, %User{} = user) do
     unless User.blocks?(user, %{ap_id: activity.data["actor"]}) or
+             ThreadMute.muted?(user, activity) or
              user.ap_id == activity.data["actor"] or
              (activity.data["type"] == "Follow" and
                 Enum.any?(Notification.for_user(user), fn notif ->