all repos — honk @ 1c48755b4d684e80252b0ce284f4426dda429f57

my fork of honk

move final bits of follow into activty
Ted Unangst tedu@tedunangst.com
Thu, 10 Sep 2020 14:46:36 -0400
commit

1c48755b4d684e80252b0ce284f4426dda429f57

parent

12edfd42ea991e8aa55f7c2ac3c45afba31fab85

2 files changed, 5 insertions(+), 8 deletions(-)

jump to
M activity.goactivity.go

@@ -1729,11 +1729,7 @@ return

} } -func followyou(user *WhatAbout, target string) { - -} - -func refollowyou(user *WhatAbout, honkerid int64) { +func followyou(user *WhatAbout, honkerid int64) { var url, owner string db := opendatabase() row := db.QueryRow("select xid, owner from honkers where honkerid = ? and userid = ? and flavor in ('unsub', 'peep', 'presub', 'sub')",
M web.goweb.go

@@ -1841,7 +1841,7 @@ http.Redirect(w, r, "/honkers", http.StatusSeeOther)

return } if goodbye == "X" { - refollowyou(user, honkerid) + followyou(user, honkerid) http.Redirect(w, r, "/honkers", http.StatusSeeOther) return }

@@ -1902,13 +1902,14 @@ }

return } - _, err = stmtSaveHonker.Exec(u.UserID, name, url, flavor, combos, info.Owner, mj) + res, err := stmtSaveHonker.Exec(u.UserID, name, url, flavor, combos, info.Owner, mj) if err != nil { log.Print(err) return } + honkerid, _ = res.LastInsertId() if flavor == "presub" { - go subsub(user, url, info.Owner) + followyou(user, honkerid) } http.Redirect(w, r, "/honkers", http.StatusSeeOther) }