From e10c9d801b206ffc2c8f1c1ce7c0538632be2c63 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 13 May 2019 09:36:28 -0400 Subject: [PATCH] support Page objects too --- activity.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/activity.go b/activity.go index 452318a..910c6f0 100644 --- a/activity.go +++ b/activity.go @@ -485,13 +485,17 @@ func xonkxonk(user *WhatAbout, item interface{}) *Honk { 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 @@ func xonkxonk(user *WhatAbout, item interface{}) *Honk { } 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")