From b24cc44e8d1e1b29cdeb916f192e30303a55ff5d Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 27 Feb 2019 15:01:54 +0100 Subject: [PATCH] Follower requests: Utilize object index. Closes #677 --- lib/pleroma/user.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 @@ def get_follow_requests_query(%User{} = user) do ), where: fragment( - "? @> ?", + "coalesce((?)->'object'->>'id', (?)->>'object') = ?", a.data, - ^%{"object" => user.ap_id} + a.data, + ^user.ap_id ) ) end