all repos — honk @ 14e01ff130deb6f65f277c5bb415d28a7692ed30

my fork of honk

better handling of address input
Ted Unangst tedu@tedunangst.com
Tue, 25 Feb 2020 13:37:44 -0500
commit

14e01ff130deb6f65f277c5bb415d28a7692ed30

parent

f9f0eb7bb0e5665c02bbfeb39adcfb0f23b56921

2 files changed, 9 insertions(+), 4 deletions(-)

jump to
M fun.gofun.go

@@ -295,13 +295,18 @@ }

return s } -func grapeape(s string) []Mention { +func grapeape(userid int64, s string) []Mention { var mentions []Mention for _, m := range strings.Split(s, " ") { - if m == "" { + if m == "" { continue } - where := gofish(m) + var where string + if name := fullname(m, userid); name != "" { + where = name + } else { + where = gofish(m) + } if where != "" { mentions = append(mentions, Mention{Who: m, Where: where}) }
M web.goweb.go

@@ -1481,7 +1481,7 @@

noise = strings.Replace(noise, "\r", "", -1) noise = quickrename(noise, userinfo.UserID) noise = hooterize(noise) - honk.Mentions = append(grapeape(mentions), bunchofgrapes(noise)...) + honk.Mentions = append(grapeape(userinfo.UserID, mentions), bunchofgrapes(noise)...) honk.Noise = noise translate(honk)