quiet a log error
This commit is contained in:
parent
ae8d1909d8
commit
2a8f20feff
|
@ -1908,14 +1908,17 @@ func followyou(user *WhatAbout, honkerid int64, sync bool) {
|
||||||
}
|
}
|
||||||
func unfollowyou(user *WhatAbout, honkerid int64, sync bool) {
|
func unfollowyou(user *WhatAbout, honkerid int64, sync bool) {
|
||||||
db := opendatabase()
|
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)
|
honkerid, user.ID)
|
||||||
var url, owner, folxid string
|
var url, owner, folxid, flavor string
|
||||||
err := row.Scan(&url, &owner, &folxid)
|
err := row.Scan(&url, &owner, &folxid, &flavor)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
elog.Printf("can't get honker xid: %s", err)
|
elog.Printf("can't get honker xid: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if flavor == "peep" {
|
||||||
|
return
|
||||||
|
}
|
||||||
ilog.Printf("unsubscribing from %s", url)
|
ilog.Printf("unsubscribing from %s", url)
|
||||||
_, err = db.Exec("update honkers set flavor = ? where honkerid = ?", "unsub", honkerid)
|
_, err = db.Exec("update honkers set flavor = ? where honkerid = ?", "unsub", honkerid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue