readonly qonk support
Ted Unangst tedu@tedunangst.com
Tue, 11 Jun 2019 23:03:53 -0400
2 files changed,
29 insertions(+),
2 deletions(-)
M
activity.go
→
activity.go
@@ -454,6 +454,8 @@ case "Delete":
obj, _ = item.GetMap("object") xid, _ = item.GetString("object") what = "eradicate" + case "Question": + fallthrough case "Note": fallthrough case "Article":@@ -479,7 +481,7 @@ }
oonker, _ = obj.GetString("attributedTo") ot, _ := obj.GetString("type") url, _ = obj.GetString("url") - if ot == "Note" || ot == "Article" || ot == "Page" { + if ot == "Note" || ot == "Article" || ot == "Page" || ot == "Question" { audience = newphone(audience, obj) xid, _ = obj.GetString("id") precis, _ = obj.GetString("summary")@@ -491,6 +493,29 @@ rid, _ = obj.GetString("inReplyTo")
convoy, _ = obj.GetString("context") if convoy == "" { convoy, _ = obj.GetString("conversation") + } + if ot == "Question" { + what = "qonk" + content += "<ul>" + ans, _ := obj.GetArray("oneOf") + for _, ai := range ans { + a, ok := ai.(junk.Junk) + if !ok { + continue + } + as, _ := a.GetString("name") + content += "<li>" + as + } + ans, _ = obj.GetArray("anyOf") + for _, ai := range ans { + a, ok := ai.(junk.Junk) + if !ok { + continue + } + as, _ := a.GetString("name") + content += "<li>" + as + } + content += "</ul>" } if what == "honk" && rid != "" { what = "tonk"
M
docs/changelog.txt
→
docs/changelog.txt
@@ -2,9 +2,11 @@ changelog
-- v ++ Read only support for qonks. + ++ Some extra commands for better database retention management. -+ Add a form to allow manual import of external posts. ++ Add a form to allow manual import of xonks. + About page