stop abusing rid for deletion, just use xid like normal
Ted Unangst tedu@tedunangst.com
Tue, 21 May 2019 19:32:43 -0400
1 files changed,
5 insertions(+),
5 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -274,11 +274,11 @@ }
func savexonk(user *WhatAbout, x *Honk) { if x.What == "eradicate" { - log.Printf("eradicating %s by %s", x.RID, x.Honker) - xonk := getxonk(user.ID, x.RID) + log.Printf("eradicating %s by %s", x.XID, x.Honker) + xonk := getxonk(user.ID, x.XID) if xonk != nil { stmtZonkDonks.Exec(xonk.ID) - _, err := stmtZonkIt.Exec(user.ID, x.RID) + _, err := stmtZonkIt.Exec(user.ID, x.XID) if err != nil { log.Printf("error eradicating: %s", err) }@@ -498,7 +498,7 @@ obj, _ = jsongetmap(item, "object")
what = "honk" case "Delete": obj, _ = jsongetmap(item, "object") - rid, _ = jsongetstring(item, "object") + xid, _ = jsongetstring(item, "object") what = "eradicate" case "Note": fallthrough@@ -543,7 +543,7 @@ what = "tonk"
} } if ot == "Tombstone" { - rid, _ = jsongetstring(obj, "id") + xid, _ = jsongetstring(obj, "id") } atts, _ := jsongetarray(obj, "attachment") for i, att := range atts {