From 68c465c4adec09d359a1ec61c4fbec5cd5f39030 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 14 Apr 2019 10:10:08 -0400 Subject: [PATCH] reduce duplicate bonks received slightly --- activity.go | 2 +- honk.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activity.go b/activity.go index 1b76f82..65f4de5 100644 --- a/activity.go +++ b/activity.go @@ -218,7 +218,7 @@ func savedonk(url string, name, media string) *Donk { } func needxonk(userid int64, x *Honk) bool { - row := stmtFindXonk.QueryRow(userid, x.XID, x.What) + row := stmtFindXonk.QueryRow(userid, x.XID) err := row.Scan(&x.ID) if err == nil { return false diff --git a/honk.go b/honk.go index 82f4e37..5489031 100644 --- a/honk.go +++ b/honk.go @@ -1014,7 +1014,7 @@ func prepareStatements(db *sql.DB) { if err != nil { log.Fatal(err) } - stmtFindXonk, err = db.Prepare("select honkid from honks where userid = ? and xid = ? and what = ?") + stmtFindXonk, err = db.Prepare("select honkid from honks where userid = ? and xid = ?") if err != nil { log.Fatal(err) }