From a01617b45cde735dee2914be00ca10fdb090ea14 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sat, 26 Apr 2025 21:00:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20OneBot=20v11=20request=20=E7=B1=BB?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20=E8=A1=A5=E5=85=A8=20session=5Fid=20?= =?UTF-8?q?=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sources/aiocqhttp/aiocqhttp_platform_adapter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py index 0dd7912e2..fb152484e 100644 --- a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +++ b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py @@ -120,6 +120,12 @@ class AiocqhttpAdapter(Platform): abm.type = MessageType.FRIEND_MESSAGE if self.unique_session and abm.type == MessageType.GROUP_MESSAGE: abm.session_id = str(abm.sender.user_id) + "_" + str(event.group_id) + else: + abm.session_id = ( + str(event.group_id) + if abm.type == MessageType.GROUP_MESSAGE + else abm.sender.user_id + ) abm.message_str = "" abm.message = [] abm.timestamp = int(time.time())