diff --git a/lib/chiya/channels.ex b/lib/chiya/channels.ex index 63259eb..e8d5a09 100644 --- a/lib/chiya/channels.ex +++ b/lib/chiya/channels.ex @@ -9,7 +9,9 @@ defmodule Chiya.Channels do alias Chiya.Notes.Note @preloads [:notes] - @public_preloads [notes: (from n in Note, where: not is_nil(n.published_at))] + @public_preloads [notes: (from n in Note, + where: not is_nil(n.published_at), + order_by: [desc: n.published_at])] @doc """ Returns the list of channels.