if the created object is url, fetch it

This commit is contained in:
Ted Unangst 2019-07-20 23:01:04 -04:00
parent a53f9b7917
commit 4e03d728b8
1 changed files with 9 additions and 1 deletions

View File

@ -528,7 +528,15 @@ func xonkxonk(user *WhatAbout, item junk.Junk, origin string) *Honk {
origin = originate(xid) origin = originate(xid)
what = "bonk" what = "bonk"
case "Create": case "Create":
obj, _ = item.GetMap("object") obj, ok = item.GetMap("object")
if !ok {
xid, _ = obj.GetString("object")
log.Printf("getting created honk: %s", xid)
obj, err = GetJunk(xid)
if err != nil {
log.Printf("error getting creation: %s", err)
}
}
what = "honk" what = "honk"
case "Delete": case "Delete":
obj, _ = item.GetMap("object") obj, _ = item.GetMap("object")