From 8c67f19066d0bb4cc4a6a439768fbd50c7c02768 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 10 Feb 2020 10:44:23 +0800 Subject: [PATCH] fix clients rules --- rules.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rules.go b/rules.go index 045aa44..095b48f 100644 --- a/rules.go +++ b/rules.go @@ -36,9 +36,11 @@ func resetMsgParsingRules() error { users = append(users, 0) muxClients.RLock() - for id, _ := range clients { - chats = append(chats, id) - users = append(users, id) + for id, c := range clients { + if c.Active { + chats = append(chats, id) + users = append(users, id) + } } muxClients.RUnlock()