Merge branch 'feature/jobs' into 'develop'
[akkoma] / lib / pleroma / notification.ex
index c7c925c890a16c4c93fbfdd55a02b3b57259950c..c88512567bada8f768b6000bc18575afe3110d09 100644 (file)
@@ -10,6 +10,7 @@ defmodule Pleroma.Notification do
   alias Pleroma.Notification
   alias Pleroma.Repo
   alias Pleroma.Web.CommonAPI.Utils
+  alias Pleroma.Web.CommonAPI
 
   import Ecto.Query
 
@@ -117,7 +118,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
-             user.ap_id == activity.data["actor"] or
+             CommonAPI.thread_muted?(user, activity) or user.ap_id == activity.data["actor"] or
              (activity.data["type"] == "Follow" and
                 Enum.any?(Notification.for_user(user), fn notif ->
                   notif.activity.data["type"] == "Follow" and