all repos — honk @ 9ecbd57f09a044972ef5ee5772d5df1808343171

my fork of honk

reget bonks even when embedded
Ted Unangst tedu@tedunangst.com
Mon, 20 May 2019 10:51:15 -0400
commit

9ecbd57f09a044972ef5ee5772d5df1808343171

parent

0dcebeece188647248925e404ff1d82b904f203c

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

jump to
M activity.goactivity.go

@@ -469,18 +469,19 @@ var obj map[string]interface{}

var ok bool switch what { case "Announce": - xid, ok = jsongetstring(item, "object") + obj, ok = jsongetmap(item, "object") if ok { - if !needxonkid(user, xid) { - return nil - } - log.Printf("getting bonk: %s", xid) - obj, err = GetJunk(xid) - if err != nil { - log.Printf("error regetting: %s", err) - } + xid, _ = jsongetstring(obj, "id") } else { - obj, _ = jsongetmap(item, "object") + xid, _ = jsongetstring(item, "object") + } + if !needxonkid(user, xid) { + return nil + } + log.Printf("getting bonk: %s", xid) + obj, err = GetJunk(xid) + if err != nil { + log.Printf("error regetting: %s", err) } what = "bonk" case "Create":