From 5f6d58255bcecab509e2997f2b6ac424bd8641c1 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 5 Feb 2020 18:48:28 +0800 Subject: [PATCH] test version for clients --- bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.go b/bot.go index 2879a2a..b856c2d 100644 --- a/bot.go +++ b/bot.go @@ -298,7 +298,7 @@ func botGetClients(m *tb.Message) { clt.Mux.Unlock() muxClients.RLock() ret := fmt.Sprintf("Version %s (%s)\n", githash, buildstamp) - for id, c := range clients { + for _, c := range clients { chat, err := bot.ChatByID(strconv.FormatInt(c.CWUserID64, 10)) logOnError(err, "botGetClients : ChatByID") var status string @@ -307,7 +307,7 @@ func botGetClients(m *tb.Message) { } else { status = `offline` } - ret = fmt.Sprintf("%s%s (%s) | @%s (online)\n", ret, c.Login, c.Build, chat.Username) + ret = fmt.Sprintf("%s%s (%s) | @%s (%s)\n", ret, c.Login, c.Build, chat.Username, status) } ret = fmt.Sprintf("%s", ret) muxClients.RUnlock()