all repos — honk @ a908e20989dd1b02c066c4d97e663c13a128cef5

my fork of honk

include domain in remote handles again
Ted Unangst tedu@tedunangst.com
Mon, 24 Jun 2019 13:05:18 -0400
commit

a908e20989dd1b02c066c4d97e663c13a128cef5

parent

8b9b8a0aafcfd6f9a8906c3089cbbc77aa1ef680

1 files changed, 5 insertions(+), 7 deletions(-)

jump to
M fun.gofun.go

@@ -40,12 +40,10 @@ h.URL = h.XID

h.Noise = mentionize(h.Noise) h.Username, h.Handle = honkerhandle(h.Honker) } else { - idx := strings.LastIndexByte(h.Honker, '/') - if idx != -1 { - h.Username, h.Handle = honkerhandle(h.Honker) - } else { - h.Username = h.Honker - h.Handle = h.Honker + _, h.Handle = honkerhandle(h.Honker) + h.Username = h.Handle + if len(h.Username) > 40 { + h.Username = h.Username[:40] + ".." } if h.URL == "" { h.URL = h.XID

@@ -339,7 +337,7 @@ m := re_unurl.FindStringSubmatch(h)

if len(m) > 2 { return m[2], fmt.Sprintf("%s@%s", m[2], m[1]) } - return "", h + return h, h } func prepend(s string, x []string) []string {