From ba9d745efaf2b7f444421ca950a257bd277a4772 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 2 Mar 2023 23:34:54 -0500 Subject: [PATCH 1/2] need to query for the sub here --- honk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/honk.go b/honk.go index d8cce9b..f14c646 100644 --- a/honk.go +++ b/honk.go @@ -401,7 +401,7 @@ func main() { fmt.Printf("user not found") return } - row := db.QueryRow("select honkerid from honkers where xid = ? and userid = ?", args[2], user.ID) + row := db.QueryRow("select honkerid from honkers where xid = ? and userid = ? and flavor in ('sub')", args[2], user.ID) var honkerid int64 err = row.Scan(&honkerid) if err != nil { From ff5b7316448b4f00a3c4ca7065f3e756b5cd8f33 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 2 Mar 2023 23:37:16 -0500 Subject: [PATCH 2/2] newlines in error messages --- honk.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/honk.go b/honk.go index f14c646..d0461a3 100644 --- a/honk.go +++ b/honk.go @@ -380,14 +380,14 @@ func main() { } user, err := butwhatabout(args[1]) if err != nil { - fmt.Printf("user not found") + fmt.Printf("user not found\n") return } var meta HonkerMeta mj, _ := jsonify(&meta) honkerid, err := savehonker(user, args[2], "", "presub", "", mj) if err != nil { - fmt.Printf("had some trouble with that: %s", err) + fmt.Printf("had some trouble with that: %s\n", err) return } followyou(user, honkerid, true) @@ -398,14 +398,14 @@ func main() { } user, err := butwhatabout(args[1]) if err != nil { - fmt.Printf("user not found") + fmt.Printf("user not found\n") return } row := db.QueryRow("select honkerid from honkers where xid = ? and userid = ? and flavor in ('sub')", args[2], user.ID) var honkerid int64 err = row.Scan(&honkerid) if err != nil { - fmt.Printf("sorry couldn't find them") + fmt.Printf("sorry couldn't find them\n") return } unfollowyou(user, honkerid, true)