all repos — honk @ b0025f872b6dcd3ed18eeb91d2bacb102e4e1c53

my fork of honk

require replyto to exist (would crash otherwise anyway)
Ted Unangst tedu@tedunangst.com
Tue, 04 Feb 2020 11:30:13 -0500
commit

b0025f872b6dcd3ed18eeb91d2bacb102e4e1c53

parent

ac5fb453bcc92c06c60f239a6a67b2a09d0641c9

2 files changed, 7 insertions(+), 22 deletions(-)

jump to
M activity.goactivity.go

@@ -381,19 +381,6 @@ }

} } -func whosthere(xid string) ([]string, string) { - obj, err := GetJunk(xid) - if err != nil { - log.Printf("error getting remote xonk: %s", err) - return nil, "" - } - convoy, _ := obj.GetString("context") - if convoy == "" { - convoy, _ = obj.GetString("conversation") - } - return newphone(nil, obj), convoy -} - func newphone(a []string, obj junk.Junk) []string { for _, addr := range []string{"to", "cc", "attributedTo"} { who, _ := obj.GetString(addr)
M web.goweb.go

@@ -1476,16 +1476,14 @@

var convoy string if rid != "" { xonk := getxonk(userinfo.UserID, rid) - if xonk != nil { - if xonk.Public { - honk.Audience = append(honk.Audience, xonk.Audience...) - } - convoy = xonk.Convoy - } else { - xonkaud, c := whosthere(rid) - honk.Audience = append(honk.Audience, xonkaud...) - convoy = c + if xonk == nil { + http.Error(w, "replyto disappeared", http.StatusNotFound) + return } + if xonk.Public { + honk.Audience = append(honk.Audience, xonk.Audience...) + } + convoy = xonk.Convoy for i, a := range honk.Audience { if a == thewholeworld { honk.Audience[0], honk.Audience[i] = honk.Audience[i], honk.Audience[0]