diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index ba2417ad08..2833570979 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -93,7 +93,7 @@ def last_read_query(user) 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