aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-06-23 19:41:28 +0000
committerMax Magorsch <arzano@gentoo.org>2020-06-23 19:41:28 +0000
commit14a35a17d7dcdbbab1b37114cb80cc7ca1cfce8a (patch)
tree87774b58534414b9ff04e133e0bb60e2d2752781
parentSpecify the used templates more explicitly (diff)
downloadarchives-14a35a17d7dcdbbab1b37114cb80cc7ca1cfce8a.tar.gz
archives-14a35a17d7dcdbbab1b37114cb80cc7ca1cfce8a.tar.bz2
archives-14a35a17d7dcdbbab1b37114cb80cc7ca1cfce8a.zip
Only show threads for popular messages
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r--pkg/app/popular/utils.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/app/popular/utils.go b/pkg/app/popular/utils.go
index 574e60b..d1adfe2 100644
--- a/pkg/app/popular/utils.go
+++ b/pkg/app/popular/utils.go
@@ -25,6 +25,7 @@ func GetPopularThreads(n int, date string) ([]*models.Message, error) {
var recentMessages []*models.Message
err := database.DBCon.Model(&recentMessages).
+ Where(`starts_thread = TRUE`).
Where("not date is null").
OrderExpr("date DESC").
Limit(n).