treat tombstone as delete

This commit is contained in:
Ted Unangst 2019-09-30 14:28:57 -04:00
parent d4688e3ff9
commit 3e9899f800
1 changed files with 12 additions and 0 deletions

View File

@ -483,6 +483,18 @@ func xonkxonk(user *WhatAbout, item junk.Junk, origin string) *Honk {
log.Printf("eradicating %s", xid) log.Printf("eradicating %s", xid)
eradicatexonk(user.ID, xid) eradicatexonk(user.ID, xid)
return nil return nil
case "Tombstone":
xid, _ = item.GetString("id")
if xid == "" {
return nil
}
if originate(xid) != origin {
log.Printf("forged delete: %s", xid)
return nil
}
log.Printf("eradicating %s", xid)
eradicatexonk(user.ID, xid)
return nil
case "Announce": case "Announce":
obj, ok = item.GetMap("object") obj, ok = item.GetMap("object")
if ok { if ok {