From: William Pitcock Date: Wed, 29 Aug 2018 18:32:04 +0000 (+0000) Subject: activitypub: use jsonb query for containment instead of recipients_to/recipients_cc. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=de9acebbf39ca397d9388b12b167b55110611fa6;p=akkoma activitypub: use jsonb query for containment instead of recipients_to/recipients_cc. --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index dad9c4865..116dbcf1e 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -415,11 +415,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do activity in query, where: fragment( - "(? && ?) or (? && ?)", + "(?->'to' \\?| ?) or (?->'cc' \\?| ?)", + activity.data, ^recipients_to, - activity.recipients_to, - ^recipients_cc, - activity.recipients_cc + activity.data, + ^recipients_cc ) ) end