all repos — honk @ 269d9b7b47e9688d367ac9bb3b55632b881f900e

my fork of honk

maybe try limiting results to two days worth
Ted Unangst tedu@tedunangst.com
Sat, 13 Apr 2019 23:04:17 -0400
commit

269d9b7b47e9688d367ac9bb3b55632b881f900e

parent

7ff15d164af060074fcf73ae3c54c516cf516fef

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M honk.gohonk.go

@@ -566,7 +566,8 @@ rows, err := stmtUserHonks.Query(name)

return getsomehonks(rows, err) } func gethonksforuser(userid int64) []*Honk { - rows, err := stmtHonksForUser.Query(userid) + dt := time.Now().UTC().Add(-2 * 24 * time.Hour) + rows, err := stmtHonksForUser.Query(userid, dt.Format(dbtimeformat)) return getsomehonks(rows, err) } func gethonksbyhonker(userid int64, honker string) []*Honk {

@@ -997,7 +998,7 @@ stmtUserHonks, err = db.Prepare("select honkid, honks.userid, username, what, honker, xid, rid, dt, url, audience, noise from honks join users on honks.userid = users.userid where honker = '' and username = ? order by honkid desc limit 50")

if err != nil { log.Fatal(err) } - stmtHonksForUser, err = db.Prepare("select honkid, honks.userid, users.username, what, honker, xid, rid, dt, url, audience, noise from honks join users on honks.userid = users.userid where honks.userid = ? order by honkid desc limit 50") + stmtHonksForUser, err = db.Prepare("select honkid, honks.userid, users.username, what, honker, xid, rid, dt, url, audience, noise from honks join users on honks.userid = users.userid where honks.userid = ? and dt > ? order by honkid desc limit 250") if err != nil { log.Fatal(err) }