@xuda.io/ai_module 1.1.3555 → 1.1.3557

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.
Files changed (2) hide show
  1. package/index.mjs +3 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1834,11 +1834,11 @@ export const get_ai_chats = async function (req, job_id, headers) {
1834
1834
  // const ai_chats = await db_module.get_app_couch_view(app_id, 'ai_chat_list', {
1835
1835
  // key: reference_id || '',
1836
1836
  // });
1837
-
1838
- const ai_chats = await db_module.find_app_couch_query(app_id, opt);
1837
+ debugger;
1838
+ const ai_chats = filter_type !== 'pending' || (await db_module.find_app_couch_query(app_id, opt));
1839
1839
  let docs = [];
1840
1840
  // for (let row of ai_chats.rows) {
1841
- for (let doc of ai_chats.docs) {
1841
+ for (let doc of ai_chats.docs || []) {
1842
1842
  // let doc = row.value;
1843
1843
  doc.notifications = 0;
1844
1844
  doc.interactions = doc?.messages?.length || 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3555",
3
+ "version": "1.1.3557",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",