diff options
author | William Pitcock <nenolod@dereferenced.org> | 2019-04-17 22:27:59 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2019-04-17 22:27:59 +0000 |
commit | 36f78c6dcdea48dfb0231a30561825832cdb4518 (patch) | |
tree | 166e2703593253b6857ff5780757b5b7ad565330 /lib | |
parent | 8c65b69d4a536311347a27f85198d2883fcd03b8 (diff) | |
download | pleroma-36f78c6dcdea48dfb0231a30561825832cdb4518.tar.gz |
activitypub: fix filtering of boosts from blocked users
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 |