stop abusing rid for deletion, just use xid like normal

This commit is contained in:
Ted Unangst 2019-05-21 19:32:43 -04:00
parent fc4f13d9e0
commit 09b471b8de
1 changed files with 5 additions and 5 deletions

View File

@ -274,11 +274,11 @@ func needxonkid(user *WhatAbout, xid string) bool {
func savexonk(user *WhatAbout, x *Honk) { func savexonk(user *WhatAbout, x *Honk) {
if x.What == "eradicate" { if x.What == "eradicate" {
log.Printf("eradicating %s by %s", x.RID, x.Honker) log.Printf("eradicating %s by %s", x.XID, x.Honker)
xonk := getxonk(user.ID, x.RID) xonk := getxonk(user.ID, x.XID)
if xonk != nil { if xonk != nil {
stmtZonkDonks.Exec(xonk.ID) stmtZonkDonks.Exec(xonk.ID)
_, err := stmtZonkIt.Exec(user.ID, x.RID) _, err := stmtZonkIt.Exec(user.ID, x.XID)
if err != nil { if err != nil {
log.Printf("error eradicating: %s", err) log.Printf("error eradicating: %s", err)
} }
@ -498,7 +498,7 @@ func xonkxonk(user *WhatAbout, item interface{}, origin string) *Honk {
what = "honk" what = "honk"
case "Delete": case "Delete":
obj, _ = jsongetmap(item, "object") obj, _ = jsongetmap(item, "object")
rid, _ = jsongetstring(item, "object") xid, _ = jsongetstring(item, "object")
what = "eradicate" what = "eradicate"
case "Note": case "Note":
fallthrough fallthrough
@ -543,7 +543,7 @@ func xonkxonk(user *WhatAbout, item interface{}, origin string) *Honk {
} }
} }
if ot == "Tombstone" { if ot == "Tombstone" {
rid, _ = jsongetstring(obj, "id") xid, _ = jsongetstring(obj, "id")
} }
atts, _ := jsongetarray(obj, "attachment") atts, _ := jsongetarray(obj, "attachment")
for i, att := range atts { for i, att := range atts {