From 54edaebbd9435c317d713dab5fd7d9acacf32c8c Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 24 Feb 2025 15:36:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20remove=20unnecessary=20ve?= =?UTF-8?q?rification=20flag=20for=20captcha=20handling=20in=20SimpleGewec?= =?UTF-8?q?hatClient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/platform/sources/gewechat/client.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 34aaa7a7d..79f61c774 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -305,12 +305,11 @@ class SimpleGewechatClient(): "uuid": qr_uuid, "appId": appid }) - verify_flag = False while retry_cnt > 0: retry_cnt -= 1 # 需要验证码 - if verify_flag or os.path.exists("data/temp/gewe_code"): + if os.path.exists("data/temp/gewe_code"): with open("data/temp/gewe_code", "r") as f: code = f.read().strip() if not code: @@ -339,7 +338,6 @@ class SimpleGewechatClient(): msg = json_blob['data']['msg'] if ret == 500 and '安全验证码' in msg: logger.warning("此次登录需要安全验证码,请在管理面板聊天页输入 /gewe_code 验证码 来验证,如 /gewe_code 123456") - verify_flag = True else: status = json_blob['data']['status'] nickname = json_blob['data'].get('nickName', '')