From 26482fc2d39712fc722c0e55249cd02b0558ebff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E7=9B=AE=E4=BE=A7=E8=80=B3?= Date: Thu, 15 May 2025 20:59:53 +0800 Subject: [PATCH] Update astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- .../platform/sources/wechatpadpro/wechatpadpro_adapter.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py b/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py index 059deffe4..fc1fb24d4 100644 --- a/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py +++ b/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py @@ -365,10 +365,7 @@ class WeChatPadProAdapter(Platform): abm.group_id = from_user_name parts = content.split(":\n", 1) - sender_wxid = "" - if len(parts) == 2: - sender_wxid = parts[0] - + sender_wxid = parts[0] if len(parts) == 2 else "" abm.sender = MessageMember(user_id=sender_wxid, nickname="") # 获取群聊发送者的nickname