diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-10 16:30:21 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-10 16:30:21 +0300 |
commit | 3db988250bcd279f20bd1742ca454aa187d89368 (patch) | |
tree | 6ea77632f57f8e35de46c5416374dd86d6bca784 /lib/pleroma/notification.ex | |
parent | 3a1aaadc18372fb8c76fa72cd20ed65dd85b2326 (diff) | |
download | pleroma-3db988250bcd279f20bd1742ca454aa187d89368.tar.gz |
[#1335] User: refactored :blocks field into :blocked_users relation.
Introduced UserBlock.
Diffstat (limited to 'lib/pleroma/notification.ex')
-rw-r--r-- | lib/pleroma/notification.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index b7ecf51e4..82faef85e 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -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 |