diff --git a/activity.go b/activity.go index 304ddc8..87c0ba6 100644 --- a/activity.go +++ b/activity.go @@ -1729,11 +1729,7 @@ func unfollowme(user *WhatAbout, who string, name string, j junk.Junk) { } } -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')", diff --git a/web.go b/web.go index 58900a4..cfe04fd 100644 --- a/web.go +++ b/web.go @@ -1841,7 +1841,7 @@ func submithonker(w http.ResponseWriter, r *http.Request) { return } if goodbye == "X" { - refollowyou(user, honkerid) + followyou(user, honkerid) http.Redirect(w, r, "/honkers", http.StatusSeeOther) return } @@ -1902,13 +1902,14 @@ func submithonker(w http.ResponseWriter, r *http.Request) { 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) }