Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Order notifications by date desc

Matt Roberts91bdc053bc93
diff --git a/app/services/sqlstore/postgres/notification.go b/app/services/sqlstore/postgres/notification.go
index 473a9fce2..f5f724b10 100644
--- a/app/services/sqlstore/postgres/notification.go
+++ b/app/services/sqlstore/postgres/notification.go
@@ -108,6 +108,7 @@ func getActiveNotifications(ctx context.Context, q *query.GetActiveNotifications
LEFT JOIN users u ON u.id = n.author_id
WHERE n.tenant_id = $1 AND n.user_id = $2
AND (n.read = false OR n.updated_at > CURRENT_DATE - INTERVAL '30 days')
+ ORDER BY n.updated_at DESC
`, tenant.ID, user.ID)
if err != nil {
return errors.Wrap(err, "failed to get active notifications")