@xuda.io/ai_module 1.1.4146 → 1.1.4148

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 +5 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4256,9 +4256,9 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
4256
4256
  let { conversation_id } = req;
4257
4257
  try {
4258
4258
  if (!conversation_id) throw new Error('missing conversation_id');
4259
-
4260
- const app_id = await account_module.get_account_default_project_id(uid);
4261
- let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
4259
+ const account_profile_info = await account_module.get_active_account_profile_info(uid);
4260
+ // const app_id = await account_module.get_account_default_project_id(uid);
4261
+ let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
4262
4262
  req.conversation_doc = conversation_doc;
4263
4263
  let ret;
4264
4264
  if (conversation_doc.reference_type === 'contacts') {
@@ -4371,7 +4371,8 @@ const contact_chat_conversation = async function (req, job_id, headers) {
4371
4371
  let receiver_conversation_doc = await db_module.get_app_couch_doc_native(receiver_app_id, conversation_id);
4372
4372
 
4373
4373
  const sender_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
4374
- const sender_app_id = await account_module.get_account_default_project_id(uid);
4374
+ // const sender_app_id = await account_module.get_account_default_project_id(uid);
4375
+ const sender_app_id = conversation_doc..app_id
4375
4376
  let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
4376
4377
 
4377
4378
  const item = await client.conversations.items.create(conversation_id, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4146",
3
+ "version": "1.1.4148",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",