include domain in remote handles again
This commit is contained in:
parent
b242186b29
commit
059540e3a7
1 changed files with 5 additions and 7 deletions
12
fun.go
12
fun.go
|
|
@ -40,12 +40,10 @@ func reverbolate(honks []*Honk) {
|
||||||
h.Noise = mentionize(h.Noise)
|
h.Noise = mentionize(h.Noise)
|
||||||
h.Username, h.Handle = honkerhandle(h.Honker)
|
h.Username, h.Handle = honkerhandle(h.Honker)
|
||||||
} else {
|
} else {
|
||||||
idx := strings.LastIndexByte(h.Honker, '/')
|
_, h.Handle = honkerhandle(h.Honker)
|
||||||
if idx != -1 {
|
h.Username = h.Handle
|
||||||
h.Username, h.Handle = honkerhandle(h.Honker)
|
if len(h.Username) > 40 {
|
||||||
} else {
|
h.Username = h.Username[:40] + ".."
|
||||||
h.Username = h.Honker
|
|
||||||
h.Handle = h.Honker
|
|
||||||
}
|
}
|
||||||
if h.URL == "" {
|
if h.URL == "" {
|
||||||
h.URL = h.XID
|
h.URL = h.XID
|
||||||
|
|
@ -339,7 +337,7 @@ func honkerhandle(h string) (string, string) {
|
||||||
if len(m) > 2 {
|
if len(m) > 2 {
|
||||||
return m[2], fmt.Sprintf("%s@%s", m[2], m[1])
|
return m[2], fmt.Sprintf("%s@%s", m[2], m[1])
|
||||||
}
|
}
|
||||||
return "", h
|
return h, h
|
||||||
}
|
}
|
||||||
|
|
||||||
func prepend(s string, x []string) []string {
|
func prepend(s string, x []string) []string {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue