fix(clbot): actually display people's usernames properly

Change-Id: Idcbb6ffbb3127520141596cea7883cd137a1ea56
Reviewed-on: https://cl.tvl.fyi/c/depot/+/441
Reviewed-by: eta <eta@theta.eu.org>
Reviewed-by: riking <rikingcoding@gmail.com>
This commit is contained in:
Luke Granger-Brown 2020-06-16 19:22:58 +01:00 committed by lukegb
parent 2a764503be
commit 6a77bbbf84

View file

@ -137,7 +137,8 @@ func username(p gerritevents.PatchSet) string {
// noping inserts a Unicode zero-width space between the first and rest characters of `user`
// in an effort to avoid pinging that user on IRC.
func noping(user string) string {
return fmt.Sprintf("%s%s%s", user[0], zeroWidthSpace, user[1:])
un := []rune(user)
return string(un[0:1]) + zeroWidthSpace + string(un[1:])
}
func patchSetURL(c gerritevents.Change, p gerritevents.PatchSet) string {