From 4749159bb9d1c5f89f18df555908c2b082e5c9b2 Mon Sep 17 00:00:00 2001 From: Raven95676 Date: Wed, 25 Feb 2026 14:48:46 +0800 Subject: [PATCH] fix(conversation): retain existing persona_id when updating conversation --- astrbot/dashboard/routes/conversation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrbot/dashboard/routes/conversation.py b/astrbot/dashboard/routes/conversation.py index 513d3603f..68eed7ef1 100644 --- a/astrbot/dashboard/routes/conversation.py +++ b/astrbot/dashboard/routes/conversation.py @@ -148,7 +148,6 @@ class ConversationRoute(Route): user_id = data.get("user_id") cid = data.get("cid") title = data.get("title") - persona_id = data.get("persona_id", "") if not user_id or not cid: return Response().error("缺少必要参数: user_id 和 cid").__dict__ @@ -158,6 +157,9 @@ class ConversationRoute(Route): ) if not conversation: return Response().error("对话不存在").__dict__ + + persona_id = data.get("persona_id", conversation.persona_id) + if title is not None or persona_id is not None: await self.conv_mgr.update_conversation( unified_msg_origin=user_id,