mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
ActivityPub: Change ordering to nulls last
in favorites query
This makes it use our existing index and speeds up the query.
This commit is contained in:
parent
d8d99fd4cf
commit
7e13200869
|
@ -1158,7 +1158,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||
|> Activity.with_joined_object()
|
||||
|> Object.with_joined_activity()
|
||||
|> select([_like, object, activity], %{activity | object: object})
|
||||
|> order_by([like, _, _], desc: like.id)
|
||||
|> order_by([like, _, _], desc_nulls_last: like.id)
|
||||
|> Pagination.fetch_paginated(
|
||||
Map.merge(params, %{"skip_order" => true}),
|
||||
pagination,
|
||||
|
|
Loading…
Reference in a new issue