fix order favorites activites
[akkoma] / lib / pleroma / pagination.ex
index 243f1a3295c37b48bae595388734cc6090f84e89..6321c26007582d47c539297921ce5505e2a12a90 100644 (file)
@@ -78,7 +78,8 @@ defmodule Pleroma.Pagination do
       since_id: :string,
       max_id: :string,
       offset: :integer,
-      limit: :integer
+      limit: :integer,
+      skip_order: :boolean
     }
 
     params =
@@ -103,6 +104,8 @@ defmodule Pleroma.Pagination do
     where(query, [{q, table_position(query, table_binding)}], q.id < ^max_id)
   end
 
+  defp restrict(query, :order, %{skip_order: true}, _), do: query
+
   defp restrict(query, :order, %{min_id: _}, table_binding) do
     order_by(
       query,