Order conversation fetches like GS does.

This commit is contained in:
Roger Braun 2017-06-30 16:30:19 +02:00
commit d4de38e8ff
3 changed files with 5 additions and 4 deletions

View file

@ -77,7 +77,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
def fetch_activities_for_context(context) do
query = from activity in Activity,
where: fragment("? @> ?", activity.data, ^%{ context: context })
where: fragment("? @> ?", activity.data, ^%{ context: context }),
order_by: [desc: :inserted_at]
Repo.all(query)
end