Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
[akkoma] / lib / pleroma / notification.ex
index b357d5399d024cc0968acc5b8719206a2306184c..585157efece020946674f764f1adf9d49264b907 100644 (file)
@@ -33,6 +33,13 @@ defmodule Pleroma.Notification do
   def for_user_query(user) do
     Notification
     |> where(user_id: ^user.id)
+    |> where(
+      [n, a],
+      fragment(
+        "? not in (SELECT ap_id FROM users WHERE info->'deactivated' @> 'true')",
+        a.actor
+      )
+    )
     |> join(:inner, [n], activity in assoc(n, :activity))
     |> join(:left, [n, a], object in Object,
       on: