forked from AkkomaGang/akkoma
Order by id instead of inserted_at to better use indexes.
This commit is contained in:
parent
763756f879
commit
9fd8640202
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ defp restrict_actor(query, _), do: query
|
||||||
def fetch_activities(recipients, opts \\ %{}) do
|
def fetch_activities(recipients, opts \\ %{}) do
|
||||||
base_query = from activity in Activity,
|
base_query = from activity in Activity,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
order_by: [desc: :inserted_at]
|
order_by: [desc: :id]
|
||||||
|
|
||||||
base_query
|
base_query
|
||||||
|> restrict_recipients(recipients)
|
|> restrict_recipients(recipients)
|
||||||
|
|
Loading…
Reference in a new issue