all repos — honk @ 94a02927a4a9ce5c44ff35dbdc51913f0049300c

my fork of honk

fix update activity
Ted Unangst tedu@tedunangst.com
Fri, 01 May 2020 01:34:08 -0400
commit

94a02927a4a9ce5c44ff35dbdc51913f0049300c

parent

269f5d576aea7161c12213ec847ac4f2d74fcfbd

3 files changed, 14 insertions(+), 6 deletions(-)

jump to
M activity.goactivity.go

@@ -1272,7 +1272,7 @@ }

} } -func junkuser(user *WhatAbout) []byte { +func junkuser(user *WhatAbout) junk.Junk { about := markitzero(user.About) j := junk.New()

@@ -1306,7 +1306,7 @@ k["owner"] = user.URL

k["publicKeyPem"] = user.Key j["publicKey"] = k - return j.ToBytes() + return j } var oldjonkers = cache.New(cache.Options{Filler: func(name string) ([]byte, bool) {

@@ -1314,7 +1314,10 @@ user, err := butwhatabout(name)

if err != nil { return nil, false } - return junkuser(user), true + var buf bytes.Buffer + j := junkuser(user) + j.Write(&buf) + return buf.Bytes(), true }, Duration: 1 * time.Minute}) func asjonker(name string) ([]byte, bool) {

@@ -1535,8 +1538,7 @@ j["actor"] = user.URL

j["published"] = dt j["to"] = []string{thewholeworld, user.URL + "/followers"} j["type"] = "Update" - jo, _ := asjonker(username) - j["object"] = jo + j["object"] = junkuser(user) msg := j.ToBytes()
M docs/changelog.txtdocs/changelog.txt

@@ -1,5 +1,11 @@

changelog +=== next + ++ Fix update activity. + ++ A few API refinements and additions. + === 0.9.0 Monitor vs Merrimack --- Add Reactions.
M web.goweb.go

@@ -562,7 +562,7 @@ http.NotFound(w, r)

return } j := junkuser(user) - w.Write(j) + j.Write(w) } func ximport(w http.ResponseWriter, r *http.Request) {