From a4b43b884af5fda3a452d4909a6cd4a948e362d6 Mon Sep 17 00:00:00 2001 From: anka <1350989414@qq.com> Date: Fri, 19 Sep 2025 13:04:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Daiocqhttp=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=99=A8at=E4=BC=9A=E8=8E=B7=E5=8F=96=E7=BE=A4?= =?UTF-8?q?=E6=98=B5=E7=A7=B0=E8=80=8C=E6=B6=88=E6=81=AF=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=9A=84=E9=80=BB=E8=BE=91=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=20(#2769)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复at会获取群昵称而消息不会获取的逻辑不一致 * style: format code --- .../platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py index bcb243ac4..d1992b6c3 100644 --- a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +++ b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py @@ -182,7 +182,8 @@ class AiocqhttpAdapter(Platform): abm = AstrBotMessage() abm.self_id = str(event.self_id) abm.sender = MessageMember( - str(event.sender["user_id"]), event.sender["nickname"] + str(event.sender["user_id"]), + event.sender.get("card") or event.sender.get("nickname", "N/A"), ) if event["message_type"] == "group": abm.type = MessageType.GROUP_MESSAGE