fix update activity
This commit is contained in:
parent
835b6efe84
commit
751245469e
12
activity.go
12
activity.go
|
@ -1272,7 +1272,7 @@ func collectiveaction(honk *Honk) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func junkuser(user *WhatAbout) []byte {
|
func junkuser(user *WhatAbout) junk.Junk {
|
||||||
about := markitzero(user.About)
|
about := markitzero(user.About)
|
||||||
|
|
||||||
j := junk.New()
|
j := junk.New()
|
||||||
|
@ -1306,7 +1306,7 @@ func junkuser(user *WhatAbout) []byte {
|
||||||
k["publicKeyPem"] = user.Key
|
k["publicKeyPem"] = user.Key
|
||||||
j["publicKey"] = k
|
j["publicKey"] = k
|
||||||
|
|
||||||
return j.ToBytes()
|
return j
|
||||||
}
|
}
|
||||||
|
|
||||||
var oldjonkers = cache.New(cache.Options{Filler: func(name string) ([]byte, bool) {
|
var oldjonkers = cache.New(cache.Options{Filler: func(name string) ([]byte, bool) {
|
||||||
|
@ -1314,7 +1314,10 @@ var oldjonkers = cache.New(cache.Options{Filler: func(name string) ([]byte, bool
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, false
|
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})
|
}, Duration: 1 * time.Minute})
|
||||||
|
|
||||||
func asjonker(name string) ([]byte, bool) {
|
func asjonker(name string) ([]byte, bool) {
|
||||||
|
@ -1535,8 +1538,7 @@ func updateMe(username string) {
|
||||||
j["published"] = dt
|
j["published"] = dt
|
||||||
j["to"] = []string{thewholeworld, user.URL + "/followers"}
|
j["to"] = []string{thewholeworld, user.URL + "/followers"}
|
||||||
j["type"] = "Update"
|
j["type"] = "Update"
|
||||||
jo, _ := asjonker(username)
|
j["object"] = junkuser(user)
|
||||||
j["object"] = jo
|
|
||||||
|
|
||||||
msg := j.ToBytes()
|
msg := j.ToBytes()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
changelog
|
changelog
|
||||||
|
|
||||||
|
=== next
|
||||||
|
|
||||||
|
+ Fix update activity.
|
||||||
|
|
||||||
|
+ A few API refinements and additions.
|
||||||
|
|
||||||
=== 0.9.0 Monitor vs Merrimack
|
=== 0.9.0 Monitor vs Merrimack
|
||||||
|
|
||||||
--- Add Reactions.
|
--- Add Reactions.
|
||||||
|
|
Loading…
Reference in New Issue