support Page objects too
Ted Unangst tedu@tedunangst.com
Mon, 13 May 2019 09:36:28 -0400
1 files changed,
8 insertions(+),
4 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -485,13 +485,17 @@ what = "bonk"
case "Create": obj, _ = jsongetmap(item, "object") what = "honk" - case "Note": - obj = item.(map[string]interface{}) - what = "honk" case "Delete": obj, _ = jsongetmap(item, "object") rid, _ = jsongetstring(item, "object") what = "eradicate" + case "Note": + fallthrough + case "Article": + fallthrough + case "Page": + obj = item.(map[string]interface{}) + what = "honk" default: log.Printf("unknown activity: %s", what) fd, _ := os.OpenFile("savedinbox.json", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)@@ -509,7 +513,7 @@ who, _ = jsongetstring(obj, "attributedTo")
} ot, _ := jsongetstring(obj, "type") url, _ = jsongetstring(obj, "url") - if ot == "Note" || ot == "Article" { + if ot == "Note" || ot == "Article" || ot == "Page" { audience = newphone(audience, obj) xid, _ = jsongetstring(obj, "id") content, _ = jsongetstring(obj, "content")