Commit 90e8aeb9 by Sixong.Zhu

u

parent a6262f4c
Showing with 6 additions and 1 deletions
......@@ -84,11 +84,16 @@ async function preCacheImgs(msgs?: any[]) {
}
function buildChatItem(chat: RawChatItem) {
if (!chat.model_name && chat.business_data) {
if ((!chat.model_name || !chat.obj_id) && chat.business_data) {
const b = JSON.parse(chat.business_data) as BaseChatItemBusinessData;
chat.model_name = b.model_name;
b.obj_id && (chat.obj_id = b.obj_id);
}
if (!chat.detail_name && chat.business_data) {
const b = JSON.parse(chat.business_data) as BaseChatItemBusinessData;
b.detail_name && (chat.detail_name = b.detail_name);
}
return { ...chat, chat_id: chat.id } as ChatType;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment