summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-09-21 16:08:38 +0200
committerlain <lain@soykaf.club>2020-09-21 16:08:38 +0200
commitf2f0a0260f00e316f62d42e766787b20cc92601a (patch)
tree97fe1e3a7af0688bdf1c2eb5d3a6e737bcc6db47 /lib
parent882c1fc6bdff4e27955730a412d73ead0e67a741 (diff)
downloadpleroma-f2f0a0260f00e316f62d42e766787b20cc92601a.tar.gz
pleroma-f2f0a0260f00e316f62d42e766787b20cc92601a.zip
ActivityPub: Don't block-filter your own posts
We are filtering out replies to people you block, but that should not include your own posts.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index 06e8e1a7c..aacd58d03 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -841,7 +841,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
from(
[activity, object: o] in query,
where: fragment("not (? = ANY(?))", activity.actor, ^blocked_ap_ids),
- where: fragment("not (? && ?)", activity.recipients, ^blocked_ap_ids),
+ where:
+ fragment(
+ "((not (? && ?)) or ? = ?)",
+ activity.recipients,
+ ^blocked_ap_ids,
+ activity.actor,
+ ^user.ap_id
+ ),
where:
fragment(
"recipients_contain_blocked_domains(?, ?) = false",