the trouble with liking things is you change your mind and then

my log fills up with undo commands
This commit is contained in:
Ted Unangst 2019-04-20 11:50:01 -04:00
parent f5f334ba31
commit 3cf015d636
1 changed files with 5 additions and 3 deletions

View File

@ -346,12 +346,14 @@ func inbox(w http.ResponseWriter, r *http.Request) {
log.Printf("unknown undo no object")
} else {
what, _ := jsongetstring(obj, "type")
if what != "Follow" {
log.Printf("unknown undo: %s", what)
} else {
switch what {
case "Follow":
log.Printf("updating honker undo: %s", who)
db := opendatabase()
db.Exec("update honkers set flavor = 'undub' where xid = ? and flavor = 'dub'", who)
case "Like":
default:
log.Printf("unknown undo: %s", what)
}
}
default: