support Page objects too
This commit is contained in:
parent
e544d5ae1d
commit
e10c9d801b
12
activity.go
12
activity.go
|
@ -485,13 +485,17 @@ func xonkxonk(user *WhatAbout, item interface{}) *Honk {
|
||||||
case "Create":
|
case "Create":
|
||||||
obj, _ = jsongetmap(item, "object")
|
obj, _ = jsongetmap(item, "object")
|
||||||
what = "honk"
|
what = "honk"
|
||||||
case "Note":
|
|
||||||
obj = item.(map[string]interface{})
|
|
||||||
what = "honk"
|
|
||||||
case "Delete":
|
case "Delete":
|
||||||
obj, _ = jsongetmap(item, "object")
|
obj, _ = jsongetmap(item, "object")
|
||||||
rid, _ = jsongetstring(item, "object")
|
rid, _ = jsongetstring(item, "object")
|
||||||
what = "eradicate"
|
what = "eradicate"
|
||||||
|
case "Note":
|
||||||
|
fallthrough
|
||||||
|
case "Article":
|
||||||
|
fallthrough
|
||||||
|
case "Page":
|
||||||
|
obj = item.(map[string]interface{})
|
||||||
|
what = "honk"
|
||||||
default:
|
default:
|
||||||
log.Printf("unknown activity: %s", what)
|
log.Printf("unknown activity: %s", what)
|
||||||
fd, _ := os.OpenFile("savedinbox.json", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
|
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")
|
ot, _ := jsongetstring(obj, "type")
|
||||||
url, _ = jsongetstring(obj, "url")
|
url, _ = jsongetstring(obj, "url")
|
||||||
if ot == "Note" || ot == "Article" {
|
if ot == "Note" || ot == "Article" || ot == "Page" {
|
||||||
audience = newphone(audience, obj)
|
audience = newphone(audience, obj)
|
||||||
xid, _ = jsongetstring(obj, "id")
|
xid, _ = jsongetstring(obj, "id")
|
||||||
content, _ = jsongetstring(obj, "content")
|
content, _ = jsongetstring(obj, "content")
|
||||||
|
|
Loading…
Reference in New Issue