all repos — honk @ ad832db02555461be2225ca8110142b06a7228f0

my fork of honk

readonly qonk support
Ted Unangst tedu@tedunangst.com
Tue, 11 Jun 2019 23:03:53 -0400
commit

ad832db02555461be2225ca8110142b06a7228f0

parent

e8daca31ac4af4da80f77ca12d84149555db9915

2 files changed, 29 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.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.txtdocs/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