From a7e460246fbc628b32a1e08da1bad1fd928377a9 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Tue, 21 Jul 2020 07:16:12 +0800 Subject: [PATCH] fix bug. --- client/entities.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/entities.go b/client/entities.go index 33010806..ebd9533f 100644 --- a/client/entities.go +++ b/client/entities.go @@ -176,7 +176,7 @@ const ( ) func (g *GroupInfo) UpdateName(newName string) { - if g.AdministratorOrOwner() && strings.Count(newName, "") <= 20 { + if g.AdministratorOrOwner() && newName != "" && strings.Count(newName, "") <= 20 { g.bot.updateGroupName(g.Code, newName) g.Name = newName }