all repos — honk @ 06ff96f72420c419871a3d85c951a0c29d6c0013

my fork of honk

add some more info to bonks.
notably adding /followers is required for pleroma to ack it.
Ted Unangst tedu@tedunangst.com
Wed, 26 Jun 2019 17:19:45 -0400
commit

06ff96f72420c419871a3d85c951a0c29d6c0013

parent

d60c51960fa83b20ff4432cdaa5ff0c5a1110676

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

jump to
M activity.goactivity.go

@@ -720,7 +720,11 @@ j := junk.New()

j["id"] = user.URL + "/" + h.What + "/" + shortxid(h.XID) j["actor"] = user.URL j["published"] = dt - j["to"] = h.Audience[0] + if h.Public { + j["to"] = []string{h.Audience[0], user.URL + "/followers"} + } else { + j["to"] = h.Audience[0] + } if len(h.Audience) > 1 { j["cc"] = h.Audience[1:] }

@@ -810,6 +814,9 @@ }

j["object"] = jo case "bonk": j["type"] = "Announce" + if h.Convoy != "" { + j["context"] = h.Convoy + } j["object"] = h.XID case "zonk": j["type"] = "Delete"
M honk.gohonk.go

@@ -812,6 +812,10 @@ return

} donksforhonks([]*Honk{xonk}) + oonker := xonk.Oonker + if oonker == "" { + oonker = xonk.Honker + } dt := time.Now().UTC() bonk := Honk{ UserID: userinfo.UserID,

@@ -821,14 +825,11 @@ Honker: user.URL,

XID: xonk.XID, Date: dt, Donks: xonk.Donks, - Audience: []string{thewholeworld}, + Convoy: xonk.Convoy, + Audience: []string{oonker, thewholeworld}, Public: true, } - oonker := xonk.Oonker - if oonker == "" { - oonker = xonk.Honker - } aud := strings.Join(bonk.Audience, " ") whofore := 2 res, err := stmtSaveHonk.Exec(userinfo.UserID, "bonk", bonk.Honker, xid, "",