From 74b8a097db6653f1f5ae703df80e6cf15dc8e27f Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 21 Feb 2021 15:01:52 +0100 Subject: [PATCH] Order newest notifications first --- pkg/notifications/database.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/notifications/database.go b/pkg/notifications/database.go index 94e679e07..655d3f565 100644 --- a/pkg/notifications/database.go +++ b/pkg/notifications/database.go @@ -53,6 +53,7 @@ func GetNotificationsForUser(s *xorm.Session, notifiableID int64, limit, start i err = s. Where("notifiable_id = ?", notifiableID). Limit(limit, start). + OrderBy("id DESC"). Find(¬ifications) if err != nil { return nil, 0, 0, err