fix honkwindow
Anirudh Oppiliappan x@icyphox.sh
Tue, 29 Aug 2023 09:13:47 +0300
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
database.go
→
database.go
@@ -36,7 +36,7 @@ "humungus.tedunangst.com/r/webs/login"
"humungus.tedunangst.com/r/webs/mz" ) -const honkwindow time.Duration = 90 * 24 * time.Hour +var honkwindow time.Duration = 30 //go:embed schema.sql var sqlSchema string@@ -247,7 +247,7 @@ }
func gethonksforme(userid int64, wanted int64) []*Honk { dt := time.Now().Add(-honkwindow).UTC().Format(dbtimeformat) - rows, err := stmtHonksForMe.Query(wanted, userid, dt, userid) + rows, err := stmtHonksForMe.Query(wanted, userid, dt, userid, 250) return getsomehonks(rows, err) } func gethonksfromlongago(userid int64, wanted int64) []*Honk {