@xuda.io/ai_module 1.1.4993 → 1.1.4995

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 +4 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1336,6 +1336,9 @@ export const get_ai_chats = async function (req, job_id, headers) {
1336
1336
  };
1337
1337
  const conversation_item_ret = await db_module.find_app_couch_query(account_profile_info.app_id, opt);
1338
1338
  doc.conversation_item = conversation_item_ret?.docs?.[0];
1339
+ if (doc?.conversation_item?.email_id) {
1340
+ doc.email_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, doc.conversation_item.email_id);
1341
+ }
1339
1342
  // doc.notifications = 0;
1340
1343
  // doc.interactions = doc?.messages?.length || 0;
1341
1344
  // for (let msg of doc.messages) {
@@ -3470,6 +3473,7 @@ export const create_conversation = async function (req, job_id, headers) {
3470
3473
 
3471
3474
  recipient_conversation_doc.thumbnail_request_ts = conversation_doc.thumbnail_request_ts;
3472
3475
  recipient_conversation_doc.chat_image = conversation_doc.chat_image;
3476
+ recipient_conversation_doc.direction = 'in';
3473
3477
  await db_module.save_app_couch_doc_native(recipient_account_profile_info.app_id, recipient_conversation_doc);
3474
3478
 
3475
3479
  await update_conversation_mood_level(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4993",
3
+ "version": "1.1.4995",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",