make sure to update the right honker
This commit is contained in:
parent
6ce45d2f23
commit
20b67a8030
4
honk.go
4
honk.go
|
@ -348,7 +348,7 @@ func inbox(w http.ResponseWriter, r *http.Request) {
|
||||||
case "Accept":
|
case "Accept":
|
||||||
db := opendatabase()
|
db := opendatabase()
|
||||||
log.Printf("updating honker accept: %s", who)
|
log.Printf("updating honker accept: %s", who)
|
||||||
db.Exec("update honkers set flavor = 'sub' where xid = ? and flavor = 'presub'", who)
|
db.Exec("update honkers set flavor = 'sub' where userid = ? and xid = ? and flavor = 'presub'", user.ID, who)
|
||||||
case "Undo":
|
case "Undo":
|
||||||
obj, ok := jsongetmap(j, "object")
|
obj, ok := jsongetmap(j, "object")
|
||||||
if !ok {
|
if !ok {
|
||||||
|
@ -359,7 +359,7 @@ func inbox(w http.ResponseWriter, r *http.Request) {
|
||||||
case "Follow":
|
case "Follow":
|
||||||
log.Printf("updating honker undo: %s", who)
|
log.Printf("updating honker undo: %s", who)
|
||||||
db := opendatabase()
|
db := opendatabase()
|
||||||
db.Exec("update honkers set flavor = 'undub' where xid = ? and flavor = 'dub'", who)
|
db.Exec("update honkers set flavor = 'undub' where userid = ? and xid = ? and flavor = 'dub'", user.ID, who)
|
||||||
case "Like":
|
case "Like":
|
||||||
default:
|
default:
|
||||||
log.Printf("unknown undo: %s", what)
|
log.Printf("unknown undo: %s", what)
|
||||||
|
|
Loading…
Reference in New Issue