@xuda.io/ai_module 1.1.5523 → 1.1.5525

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 +1 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3856,7 +3856,7 @@ const contact_chat_conversation = async function (req, job_id, headers) {
3856
3856
  let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
3857
3857
 
3858
3858
  try {
3859
- add_conversation_item(uid, profile_id, conversation_id, prompt, 'chat', conversation_doc.reference_id);
3859
+ add_conversation_item(uid, profile_id, conversation_id, prompt, 'chat', conversation_doc.reference_id, { direction: 'out' });
3860
3860
 
3861
3861
  report_ai_status('conversations');
3862
3862
  } catch (err) {
@@ -3864,11 +3864,7 @@ const contact_chat_conversation = async function (req, job_id, headers) {
3864
3864
  throw err;
3865
3865
  }
3866
3866
 
3867
- // const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'chat' };
3868
- // receiver_conversation_doc.messages.push(obj);
3869
-
3870
3867
  await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
3871
- // sender_conversation_doc.messages.push({ ...obj, ...{ read: false } });
3872
3868
 
3873
3869
  await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
3874
3870
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5523",
3
+ "version": "1.1.5525",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",