summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/.search_config.fix.swpbin0 -> 12288 bytes
-rw-r--r--changelog.d/notifications-index.fix1
-rw-r--r--lib/pleroma/notification.ex2
3 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/.search_config.fix.swp b/changelog.d/.search_config.fix.swp
new file mode 100644
index 000000000..e310fa87e
--- /dev/null
+++ b/changelog.d/.search_config.fix.swp
Binary files differ
diff --git a/changelog.d/notifications-index.fix b/changelog.d/notifications-index.fix
new file mode 100644
index 000000000..4617cbec0
--- /dev/null
+++ b/changelog.d/notifications-index.fix
@@ -0,0 +1 @@
+Fix notifications query which was not using the index properly
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
index 48d467c59..368e609d2 100644
--- a/lib/pleroma/notification.ex
+++ b/lib/pleroma/notification.ex
@@ -88,7 +88,7 @@ defmodule Pleroma.Notification do
where: q.seen == true,
select: type(q.id, :string),
limit: 1,
- order_by: [desc: :id]
+ order_by: fragment("? desc nulls last", q.id)
)
end