fix update activity
Ted Unangst tedu@tedunangst.com
Fri, 01 May 2020 01:34:08 -0400
3 files changed,
14 insertions(+),
6 deletions(-)
M
activity.go
→
activity.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.txt
→
docs/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.