From: lain Date: Sun, 13 May 2018 09:58:03 +0000 (+0200) Subject: Unlisted fetching: Reverse logic X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=3c3933e40bce7001b5025bf2e05412dd9c128f0f;p=akkoma Unlisted fetching: Reverse logic Generates a faster query. --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 8086c830c..d43f85ee4 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -327,7 +327,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do activity in query, where: fragment( - "(?->'to' \\?| ?)", + "not (coalesce(?->'cc', '{}'::jsonb) \\?| ?)", activity.data, ^["https://www.w3.org/ns/activitystreams#Public"] )