sometimes the honk is inside the bonk!

This commit is contained in:
Ted Unangst 2019-04-25 00:50:41 -04:00
parent 986ae581fc
commit 99d89bb62c
1 changed files with 10 additions and 5 deletions

View File

@ -410,13 +410,18 @@ func xonkxonk(item interface{}) *Honk {
var err error var err error
var xid, rid, url, content, convoy string var xid, rid, url, content, convoy string
var obj map[string]interface{} var obj map[string]interface{}
var ok bool
switch what { switch what {
case "Announce": case "Announce":
xid, _ = jsongetstring(item, "object") xid, ok = jsongetstring(item, "object")
log.Printf("getting bonk: %s", xid) if ok {
obj, err = GetJunk(xid) log.Printf("getting bonk: %s", xid)
if err != nil { obj, err = GetJunk(xid)
log.Printf("error regetting: %s", err) if err != nil {
log.Printf("error regetting: %s", err)
}
} else {
obj, _ = jsongetmap(item, "object")
} }
what = "bonk" what = "bonk"
case "Create": case "Create":