Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields...
[akkoma] / lib / pleroma / notification.ex
index b7ecf51e4681fc9a25b8d1cd9d596c928f930bba..82faef85e3e28bd3053cb8fe72fea66c40b99060 100644 (file)
@@ -60,8 +60,10 @@ defmodule Pleroma.Notification do
   end
 
   defp exclude_blocked(query, user) do
+    blocked_ap_ids = User.blocked_ap_ids(user)
+
     query
-    |> where([n, a], a.actor not in ^user.blocks)
+    |> where([n, a], a.actor not in ^blocked_ap_ids)
     |> where(
       [n, a],
       fragment("substring(? from '.*://([^/]*)')", a.actor) not in ^user.domain_blocks