aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index d54dc224d..4e0be5ba2 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -313,9 +313,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
on: sender.ap_id == activity.actor,
# Are non-direct statuses with no to/cc possible?
where:
- fragment("not coalesce(data->'to' \\? ?, false)", ^public) and
- fragment("not coalesce(data->'cc' \\? ?, false)", ^public) and
- fragment("not coalesce(data->'to' \\? ?, false)", sender.follower_address)
+ fragment(
+ "not (? && ?)",
+ [^public, sender.follower_address],
+ activity.recipients
+ )
)
end