all repos — honk @ 2586b3b49e60f3f6f4305d494efde27bfbd86ac9

my fork of honk

a convoy is a whole fleet of honks, coming at ya
Ted Unangst tedu@tedunangst.com
Fri, 19 Apr 2019 11:50:35 -0400
commit

2586b3b49e60f3f6f4305d494efde27bfbd86ac9

parent

2f6e8e50ab7728478a91f135cd0ae41866fd8d0c

3 files changed, 25 insertions(+), 10 deletions(-)

jump to
M activity.goactivity.go

@@ -312,7 +312,7 @@ return b, nil

} func peeppeep() { - user, _ := butwhatabout("") + user, _ := butwhatabout("htest") honkers := gethonkers(user.ID) for _, f := range honkers { if f.Flavor != "peep" {

@@ -354,13 +354,14 @@ }

} } -func whosthere(xid string) []string { +func whosthere(xid string) ([]string, string) { obj, err := GetJunk(xid) if err != nil { log.Printf("error getting remote xonk: %s", err) - return nil + return nil, "" } - return newphone(nil, obj) + convoy, _ := jsongetstring(obj, "conversation") + return newphone(nil, obj), convoy } func newphone(a []string, obj map[string]interface{}) []string {

@@ -387,7 +388,7 @@ dt, _ := jsongetstring(item, "published")

var audience []string var err error - var xid, rid, url, content string + var xid, rid, url, content, convoy string var obj map[string]interface{} switch what { case "Announce":

@@ -424,6 +425,7 @@ if summary != "" {

content = "<p>summary: " + summary + content } rid, _ = jsongetstring(obj, "inReplyTo") + convoy, _ = jsongetstring(obj, "conversation") if what == "honk" && rid != "" { what = "tonk" }

@@ -476,6 +478,7 @@ xonk.Date, _ = time.Parse(time.RFC3339, dt)

xonk.URL = url xonk.Noise = content xonk.Audience = audience + xonk.Convoy = convoy return &xonk }

@@ -566,6 +569,9 @@ jo["url"] = user.URL + "/h/" + h.XID

jo["attributedTo"] = user.URL if h.RID != "" { jo["inReplyTo"] = h.RID + } + if h.Convoy != "" { + jo["conversation"] = h.Convoy } jo["to"] = h.Audience[0] if len(h.Audience) > 1 {
M honk.gohonk.go

@@ -663,7 +663,7 @@ }

if xonk.Honker == "" { xonk.XID = fmt.Sprintf("https://%s/u/%s/h/%s", serverName, xonk.Username, xonk.XID) } - convoy := "" + convoy := xonk.Convoy userinfo := GetUserInfo(r)

@@ -676,7 +676,7 @@ What: "bonk",

XID: xonk.XID, Date: dt, Noise: xonk.Noise, - Convoy: convoy, + Convoy: convoy, Donks: xonk.Donks, Audience: oneofakind(prepend(thewholeworld, xonk.Audience)), }

@@ -723,7 +723,6 @@ what := "honk"

if rid != "" { what = "tonk" } - convoy := "" honk := Honk{ UserID: userinfo.UserID, Username: userinfo.Username,

@@ -731,25 +730,31 @@ What: "honk",

XID: xid, RID: rid, Date: dt, - Convoy: convoy, } if noise[0] == '@' { honk.Audience = append(grapevine(noise), thewholeworld) } else { honk.Audience = prepend(thewholeworld, grapevine(noise)) } + var convoy string if rid != "" { xonk := getxonk("", rid) if xonk != nil { honk.Audience = append(honk.Audience, xonk.Audience...) + convoy = xonk.Convoy } else { - xonkaud := whosthere(rid) + xonkaud, c := whosthere(rid) honk.Audience = append(honk.Audience, xonkaud...) + convoy = c } } + if convoy == "" { + convoy = "data:,electrichonkytonk-" + xfiltrate() + } honk.Audience = oneofakind(honk.Audience) noise = obfusbreak(noise) honk.Noise = noise + honk.Convoy = convoy file, filehdr, err := r.FormFile("donk") if err == nil {
M views/honk.htmlviews/honk.html

@@ -9,6 +9,10 @@ <span style="margin-left: 4em;" class="clip">

in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a> </span> {{ end }} +<br> +<span style="margin-left: 4em;" class="clip"> +convoy: {{ .Convoy }} +</span> </div> <div class="noise"> <p>{{ .HTML }}