all repos — honk @ 76d8e301e74b46da13000eb4d775b3dd76c0e3c5

my fork of honk

for now, no chats older than 3 days
Ted Unangst tedu@tedunangst.com
Sat, 23 May 2020 19:05:23 -0400
commit

76d8e301e74b46da13000eb4d775b3dd76c0e3c5

parent

5c1f630bfc07677366ee14981b03f0911262ec3b

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

jump to
M database.godatabase.go

@@ -539,7 +539,8 @@ return err

} func loadchatter(userid int64) map[string][]*Chonk { - rows, err := stmtLoadChonks.Query(userid) + duedt := time.Now().Add(-3 * 24 * time.Hour).UTC().Format(dbtimeformat) + rows, err := stmtLoadChonks.Query(userid, duedt) if err != nil { log.Printf("error loading chonks: %s", err) return nil

@@ -899,5 +900,5 @@ stmtSaveFilter = preparetodie(db, "insert into hfcs (userid, json) values (?, ?)")

stmtDeleteFilter = preparetodie(db, "delete from hfcs where userid = ? and hfcsid = ?") stmtGetTracks = preparetodie(db, "select fetches from tracks where xid = ?") stmtSaveChonk = preparetodie(db, "insert into chonks (userid, xid, who, target, dt, noise, format) values (?, ?, ?, ?, ?, ?, ?)") - stmtLoadChonks = preparetodie(db, "select chonkid, userid, xid, who, target, dt, noise, format from chonks where userid = ?") + stmtLoadChonks = preparetodie(db, "select chonkid, userid, xid, who, target, dt, noise, format from chonks where userid = ? and dt > ? order by chonkid asc") }