all repos — honk @ fedcddbeeafa54798758bbb438d25b85c0fc6221

my fork of honk

try showing only unkown honkers in xzone
Ted Unangst tedu@tedunangst.com
Wed, 14 Aug 2019 15:46:21 -0400
commit

fedcddbeeafa54798758bbb438d25b85c0fc6221

parent

e594b995656218c32baa1a3265a6b82351647a4f

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

jump to
M honk.gohonk.go

@@ -469,7 +469,7 @@

func xzone(w http.ResponseWriter, r *http.Request) { u := login.GetUserInfo(r) var honkers []string - rows, err := stmtRecentHonkers.Query(u.UserID) + rows, err := stmtRecentHonkers.Query(u.UserID, u.UserID) if err != nil { log.Printf("query err: %s", err) return

@@ -1620,7 +1620,7 @@ stmtSaveZonker = preparetodie(db, "insert into zonkers (userid, name, wherefore) values (?, ?, ?)")

stmtGetXonker = preparetodie(db, "select info from xonkers where name = ? and flavor = ?") stmtSaveXonker = preparetodie(db, "insert into xonkers (name, info, flavor) values (?, ?, ?)") stmtDeleteXonker = preparetodie(db, "delete from xonkers where name = ? and flavor = ?") - stmtRecentHonkers = preparetodie(db, "select distinct(honker) from honks where userid = ? order by honkid desc limit 100") + stmtRecentHonkers = preparetodie(db, "select distinct(honker) from honks where userid = ? and honker not in (select xid from honkers where userid = ? and flavor = 'sub') order by honkid desc limit 100") } func ElaborateUnitTests() {