aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/app/list/threads.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/app/list/threads.go b/pkg/app/list/threads.go
index dfc9694..403f7db 100644
--- a/pkg/app/list/threads.go
+++ b/pkg/app/list/threads.go
@@ -3,7 +3,6 @@ package list
import (
"archives/pkg/database"
"archives/pkg/models"
- "github.com/go-pg/pg/v10/orm"
"math"
"net/http"
"strconv"
@@ -35,11 +34,7 @@ func Threads(w http.ResponseWriter, r *http.Request) {
Column("id", "subject", "from", "date").
Where("to_char(date, 'YYYY-MM') = ?", combinedDate).
Where(`starts_thread = TRUE`).
- WhereGroup(func(q *orm.Query) (*orm.Query, error) {
- q = q.WhereOr(`subject LIKE '[` + listName + `]%'`).
- WhereOr(`subject LIKE 'Re: [` + listName + `]%'`)
- return q, nil
- }).
+ Where("list = ?", listName).
Order("date DESC")
messagesCount, _ := query.Count()