From 6a77bbbf8464be15a0e9a824bc946b3dc37b05d5 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 16 Jun 2020 19:22:58 +0100 Subject: fix(clbot): actually display people's usernames properly Change-Id: Idcbb6ffbb3127520141596cea7883cd137a1ea56 Reviewed-on: https://cl.tvl.fyi/c/depot/+/441 Reviewed-by: eta Reviewed-by: riking --- fun/clbot/clbot.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fun') diff --git a/fun/clbot/clbot.go b/fun/clbot/clbot.go index 222ce07788..37d9a222e7 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 { -- cgit 1.4.1