all repos — honk @ 5422207280779349b192adf39879424c6a841940

my fork of honk

support Page objects too
Ted Unangst tedu@tedunangst.com
Mon, 13 May 2019 09:36:28 -0400
commit

5422207280779349b192adf39879424c6a841940

parent

a9dfd9f24c316952dc6de514b24e722d1f093875

1 files changed, 8 insertions(+), 4 deletions(-)

jump to
M activity.goactivity.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")