@xuda.io/ai_module 1.1.4221 → 1.1.4222

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 +2 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4451,16 +4451,8 @@ const chat_note = async function (req, job_id, headers) {
4451
4451
  const { uid } = req;
4452
4452
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
4453
4453
  let { prompt, conversation_doc, attachments = [], ai_agents } = req;
4454
- // const { account_profile_info } = conversation_doc;
4455
- const conversation_id = conversation_doc._id;
4456
-
4457
- // const receiver_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
4458
- // const receiver_app_id = await account_module.get_account_default_project_id(receiver_contact_doc.contact_uid);
4459
- // let receiver_conversation_doc = await db_module.get_app_couch_doc_native(receiver_app_id, conversation_id);
4460
4454
 
4461
- // let sender_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
4462
-
4463
- // account_module.ts_contact(conversation_doc.reference_id);
4455
+ const conversation_id = conversation_doc._id;
4464
4456
 
4465
4457
  const sender_app_id = account_profile_info.app_id; //await account_module.get_account_default_project_id(uid);
4466
4458
  let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
@@ -4478,8 +4470,7 @@ const chat_note = async function (req, job_id, headers) {
4478
4470
  });
4479
4471
 
4480
4472
  const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'note' };
4481
- // receiver_conversation_doc.messages.push(obj);
4482
- // await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
4473
+
4483
4474
  sender_conversation_doc.messages.push({ ...obj, ...{ read: false } });
4484
4475
  await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
4485
4476
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4221",
3
+ "version": "1.1.4222",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",