From: rinpatch Date: Mon, 3 Jun 2019 07:58:37 +0000 (+0300) Subject: Change query order in fetch_activities_for_context_query to make poll vote exclusion... X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=5bd41fef8b5aeff53ed6b096e04507d51c93a83a;hp=baefb97dc4f4435027f6e23e77433e4bfaf0dcd1;p=akkoma Change query order in fetch_activities_for_context_query to make poll vote exclusion work --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index d494d5cd1..45feae25a 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -489,7 +489,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do from(activity in Activity) |> maybe_preload_objects(opts) - |> exclude_poll_votes(opts) |> restrict_blocked(opts) |> restrict_recipients(recipients, opts["user"]) |> where( @@ -502,6 +501,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do ^context ) ) + |> exclude_poll_votes(opts) |> order_by([activity], desc: activity.id) end