diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-04-18 18:29:57 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-04-18 18:29:57 +0000 |
commit | eba3db09667860931db55508d59e284b9fd43f5e (patch) | |
tree | 4d44d41dc9380d35288b9966c4d02bc8ace9c0a0 /lib | |
parent | ad3270c2417ae27cd9d636a84033821823465f91 (diff) | |
parent | 36f78c6dcdea48dfb0231a30561825832cdb4518 (diff) | |
download | pleroma-eba3db09667860931db55508d59e284b9fd43f5e.tar.gz |
Merge branch 'bugfix/filter-boosted-blocks' into 'develop'
activitypub: fix filtering of boosts from blocked users
See merge request pleroma/pleroma!1074
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 68317ee6a..cb88ba308 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -713,6 +713,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do activity in query, where: fragment("not (? = ANY(?))", activity.actor, ^blocks), where: fragment("not (? && ?)", activity.recipients, ^blocks), + where: + fragment( + "not (?->>'type' = 'Announce' and ?->'to' \\?| ?)", + activity.data, + activity.data, + ^blocks + ), where: fragment("not (split_part(?, '/', 3) = ANY(?))", activity.actor, ^domain_blocks) ) end |