From: Francis Dinh Date: Thu, 24 May 2018 17:26:59 +0000 (-0400) Subject: Rewrite block fetch query X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1197ec10a83c2e61251abe383bea2bcc690d9c09;p=akkoma Rewrite block fetch query --- diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 3f88a4672..89d11781d 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -366,8 +366,9 @@ defmodule Pleroma.Web.ActivityPub.Utils do fragment( "? @> ?", activity.data, - ^%{type: "Block", actor: blocker_id, object: blocked_id} + ^%{type: "Block", object: blocked_id} ), + where: activity.actor == ^blocker_id, order_by: [desc: :id], limit: 1 )