include domain in remote handles again

This commit is contained in:
Ted Unangst 2019-06-24 13:05:18 -04:00
parent b242186b29
commit 059540e3a7
1 changed files with 5 additions and 7 deletions

12
fun.go
View File

@ -40,12 +40,10 @@ func reverbolate(honks []*Honk) {
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 @@ func honkerhandle(h string) (string, string) {
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 {