From 2a8f20feff92dd9a1d9102d9d26a60c93ca081bf Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 17 Mar 2023 14:28:29 -0400 Subject: [PATCH] quiet a log error --- activity.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/activity.go b/activity.go index 64e1ae9..dd78352 100644 --- a/activity.go +++ b/activity.go @@ -1908,14 +1908,17 @@ func followyou(user *WhatAbout, honkerid int64, sync bool) { } func unfollowyou(user *WhatAbout, honkerid int64, sync bool) { db := opendatabase() - row := db.QueryRow("select xid, owner, folxid from honkers where honkerid = ? and userid = ? and flavor in ('sub')", + row := db.QueryRow("select xid, owner, folxid, flavor from honkers where honkerid = ? and userid = ? and flavor in ('unsub', 'peep', 'presub', 'sub')", honkerid, user.ID) - var url, owner, folxid string - err := row.Scan(&url, &owner, &folxid) + var url, owner, folxid, flavor string + err := row.Scan(&url, &owner, &folxid, &flavor) if err != nil { elog.Printf("can't get honker xid: %s", err) return } + if flavor == "peep" { + return + } ilog.Printf("unsubscribing from %s", url) _, err = db.Exec("update honkers set flavor = ? where honkerid = ?", "unsub", honkerid) if err != nil {