Fix: 当多个相同消息平台实例部署时上下文可能混乱(共享) (#2298)

* perf: update astrbot event session format, using platfrom id to ensure uniqueness

fixes: #1000

* fix: 更新 MessageSession 类以使用 platform_id 作为唯一标识符,并调整相关方法以确保一致性

* fix: 更新 MessageSession 文档以明确 platform_id 的赋值规则,并调整 get_platform 和 get_platform_inst 方法的返回类型
This commit is contained in:
Soulter
2025-08-02 21:38:55 +08:00
committed by GitHub
parent 1b37530c96
commit 87f05fce66
7 changed files with 54 additions and 14 deletions
+1 -1
View File
@@ -820,7 +820,7 @@ UID: {user_id} 此 ID 可用于设置管理员。
if sid:
session = str(
MessageSesion(
platform_name=message.platform_meta.name,
platform_name=message.platform_meta.id,
message_type=MessageType("GroupMessage"),
session_id=sid,
)