all repos — honk @ 4fa6445a38961746799a9c8fbc935c132ca72906

my fork of honk

redo create ingestion to follow normal pipeline (again?)
Ted Unangst tedu@tedunangst.com
Wed, 13 May 2020 14:36:16 -0400
commit

4fa6445a38961746799a9c8fbc935c132ca72906

parent

960e9141ae5a1e57bb83e21e071b761650af965f

1 files changed, 10 insertions(+), 9 deletions(-)

jump to
M activity.goactivity.go

@@ -462,7 +462,7 @@ depth--

} xonkxonkfn = func(item junk.Junk, origin string) *Honk { - // id, _ := item.GetString( "id") + id, _ := item.GetString("id") what, _ := item.GetString("type") dt, ok := item.GetString("published") if !ok {

@@ -529,19 +529,20 @@ obj, ok = item.GetMap("object")

if !ok { xid, _ = item.GetString("object") log.Printf("getting created honk: %s", xid) + if originate(xid) != origin { + log.Printf("out of bounds %s not from %s", xid, origin) + return nil + } obj, err = GetJunkHardMode(xid) if err != nil { log.Printf("error getting creation: %s", err) } } - what = "honk" - if obj != nil { - t, _ := obj.GetString("type") - switch t { - case "Event": - what = "event" - } + if obj == nil { + log.Printf("no object for creation %s", id) + return nil } + return xonkxonkfn(obj, origin) case "Read": xid, ok = item.GetString("object") if ok {

@@ -610,7 +611,7 @@ item.Write(os.Stdout)

return nil } if originate(xid) != origin { - log.Printf("original sin: %s <> %s", xid, origin) + log.Printf("original sin: %s not from %s", xid, origin) item.Write(os.Stdout) return nil }