reget bonks even when embedded
Ted Unangst tedu@tedunangst.com
Mon, 20 May 2019 10:51:15 -0400
1 files changed,
11 insertions(+),
10 deletions(-)
jump to
M
activity.go
→
activity.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":