all repos — honk @ c771af412c97074b60e9b357bbbbc474e1d34e66

my fork of honk

homepage change: only followed honkers shown, allow silence with -.
Ted Unangst tedu@tedunangst.com
Fri, 17 May 2019 17:53:06 -0400
commit

c771af412c97074b60e9b357bbbbc474e1d34e66

parent

724f98d69d0ae219f4f656b97376658360474e49

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

jump to
M honk.gohonk.go

@@ -594,7 +594,7 @@ return getsomehonks(rows, err)

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

@@ -948,6 +948,11 @@ honkers := gethonkers(userinfo.UserID)

var combos []string for _, h := range honkers { combos = append(combos, h.Combos...) + } + for i, c := range combos { + if c == "-" { + combos[i] = "" + } } combos = oneofakind(combos) sort.Strings(combos)

@@ -1320,7 +1325,7 @@ butnotthose := " and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"

stmtOneXonk = preparetodie(db, selecthonks+"where honks.userid = ? and xid = ?") stmtPublicHonks = preparetodie(db, selecthonks+"where honker = '' and dt > ?"+limit) stmtUserHonks = preparetodie(db, selecthonks+"where honker = '' and username = ? and dt > ?"+limit) - stmtHonksForUser = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ?"+butnotthose+limit) + stmtHonksForUser = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ? and honker in (select xid from honkers where userid = ? and flavor = 'sub' and combos not like '% - %')"+butnotthose+limit) stmtHonksForMe = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ? and whofore = 1"+butnotthose+limit) stmtHonksByHonker = preparetodie(db, selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.name = ?"+butnotthose+limit) stmtHonksByCombo = preparetodie(db, selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.combos like ?"+butnotthose+limit)