about summary refs log tree commit diff
path: root/fun
diff options
context:
space:
mode:
authorLuke Granger-Brown <hg@lukegb.com>2020-06-16T18·22+0100
committerlukegb <lukegb@tvl.fyi>2020-06-16T18·42+0000
commit6a77bbbf8464be15a0e9a824bc946b3dc37b05d5 (patch)
tree88d1a5dcfefd0c01aba10b85db7906ca48689e10 /fun
parent2a764503bef17781bdd5d57ec041208c040eb127 (diff)
fix(clbot): actually display people's usernames properly r/1001
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>
Diffstat (limited to 'fun')
-rw-r--r--fun/clbot/clbot.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/fun/clbot/clbot.go b/fun/clbot/clbot.go
index 222ce07788d9..37d9a222e7a1 100644
--- a/fun/clbot/clbot.go
+++ b/fun/clbot/clbot.go
@@ -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 {