[#1335] Reorganized `users.mutes` as relation to UserMute entity.
[akkoma] / lib / pleroma / notification.ex
index 83844d3be4c58f78f81f17e6fc6e47a71af3ad1b..82faef85e3e28bd3053cb8fe72fea66c40b99060 100644 (file)
@@ -60,11 +60,13 @@ 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.info.blocks)
+    |> where([n, a], a.actor not in ^blocked_ap_ids)
     |> where(
       [n, a],
-      fragment("substring(? from '.*://([^/]*)')", a.actor) not in ^user.info.domain_blocks
+      fragment("substring(? from '.*://([^/]*)')", a.actor) not in ^user.domain_blocks
     )
   end