test version for clients

This commit is contained in:
shoopea 2020-02-05 18:48:28 +08:00
parent 4bbcfacedc
commit 5f6d58255b

4
bot.go
View File

@ -298,7 +298,7 @@ func botGetClients(m *tb.Message) {
clt.Mux.Unlock()
muxClients.RLock()
ret := fmt.Sprintf("<code>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</code>", ret)
muxClients.RUnlock()