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