@xuda.io/ai_module 1.1.5058 → 1.1.5060
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1125,7 +1125,7 @@ export const get_chat_conversation = async function (req) {
|
|
|
1125
1125
|
};
|
|
1126
1126
|
|
|
1127
1127
|
export const get_ai_chats = async function (req, job_id, headers) {
|
|
1128
|
-
let { uid, reference_id = '', _id, search, filter_type = 'all', conversation_type, limit, skip, conversation_id, profile_id } = req;
|
|
1128
|
+
let { uid, reference_type, reference_id = '', _id, search, filter_type = 'all', conversation_type, limit, skip, conversation_id, profile_id } = req;
|
|
1129
1129
|
|
|
1130
1130
|
const account_profile_info = await get_active_account_profile_info(uid, profile_id);
|
|
1131
1131
|
|
|
@@ -1343,7 +1343,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1343
1343
|
// let _conversation = conversations[val.value.conversation_id];
|
|
1344
1344
|
|
|
1345
1345
|
if (!conversations[val.value.conversation_id]) {
|
|
1346
|
-
conversations[val.value.conversation_id]
|
|
1346
|
+
conversations[val.value.conversation_id] = {};
|
|
1347
1347
|
}
|
|
1348
1348
|
|
|
1349
1349
|
conversations[val.value.conversation_id][val.value.type] = val.doc;
|
|
@@ -1382,7 +1382,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1382
1382
|
let ai_chats = { docs: [], total_docs: 0 };
|
|
1383
1383
|
|
|
1384
1384
|
if (filter_type !== 'pending') {
|
|
1385
|
-
if (reference_id) {
|
|
1385
|
+
if (reference_id && reference_type === 'contacts') {
|
|
1386
1386
|
ai_chats = await get_data_view();
|
|
1387
1387
|
debugger;
|
|
1388
1388
|
} else {
|