diff --git a/pkg/notify/models/mod_contact.go b/pkg/notify/models/mod_contact.go index 029ca39acb..1592e8410b 100644 --- a/pkg/notify/models/mod_contact.go +++ b/pkg/notify/models/mod_contact.go @@ -272,6 +272,8 @@ func (self *SContactManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQu q = q.Equals("uid", userCred.GetUserId()) } + q = q.GroupBy("uid").Desc("created_at") + return q, nil }