aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-17 11:32:24 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-17 11:32:24 +0200
commitb7b3e3f263135c76797ad3a69dd4438acbecf8a2 (patch)
tree3a541c2af2afc4d5b143957018df9af82bd4c7e8
parent678dd4c8ec85c34e1fded7d48ee0ab26e9555aad (diff)
downloadpleroma-b7b3e3f263135c76797ad3a69dd4438acbecf8a2.tar.gz
Use inserted_at as sort in search.
-rw-r--r--lib/pleroma/web/twitter_api/twitter_api.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex
index 69287b9fb..d5c5cf5cf 100644
--- a/lib/pleroma/web/twitter_api/twitter_api.ex
+++ b/lib/pleroma/web/twitter_api/twitter_api.ex
@@ -213,7 +213,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
where: fragment("to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)", a.data, ^query),
limit: ^limit,
offset: ^offset,
- order_by: [desc: :updated_at] # this one isn't indexed so psql won't take the wrong index.
+ order_by: [desc: :inserted_at] # this one isn't indexed so psql won't take the wrong index.
activities = Repo.all(q)
activities_to_statuses(activities, %{for: user})