From: lain Date: Wed, 27 Feb 2019 14:01:54 +0000 (+0100) Subject: Follower requests: Utilize object index. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b24cc44e8d1e1b29cdeb916f192e30303a55ff5d;p=akkoma Follower requests: Utilize object index. Closes #677 --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 01d532ab3..c5085fa82 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -613,9 +613,10 @@ defmodule Pleroma.User do ), where: fragment( - "? @> ?", + "coalesce((?)->'object'->>'id', (?)->>'object') = ?", a.data, - ^%{"object" => user.ap_id} + a.data, + ^user.ap_id ) ) end