X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fnotification.ex;h=8442643072cf5c9bc56bda9d0ce2d0116643b576;hb=c0b7bc2927cb7d4826fe2c992a90c571a06e94c1;hp=dd274cf6b22b8bdb2412b79d759f1bd7189e2239;hpb=b9cdf6d3b9940fded7d6be9f8771fd9c211afdd4;p=akkoma diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index dd274cf6b..844264307 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -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: