@xuda.io/ai_module 1.1.4273 → 1.1.4274

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 +16 -14
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4193,21 +4193,23 @@ export const create_conversation = async function (req, job_id, headers) {
4193
4193
  //recipient_contact_id
4194
4194
  // const sender_contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [receiver_contact_doc.contact_uid, uid] });
4195
4195
 
4196
- const opt = {
4197
- selector: {
4198
- docType: 'contact',
4199
- stat: 3,
4200
- contact_uid: uid,
4201
- },
4202
- limit: 1,
4203
- fields: ['_id'],
4204
- };
4205
- const recipient_contact_ret = await account_module.find_contact_query(receiver_contact_doc.contact_uid, opt);
4196
+ // const opt = {
4197
+ // selector: {
4198
+ // docType: 'contact',
4199
+ // stat: 3,
4200
+ // contact_uid: uid,
4201
+ // },
4202
+ // limit: 1,
4203
+ // fields: ['_id'],
4204
+ // };
4205
+ // const recipient_contact_ret = await account_module.find_contact_query(receiver_contact_doc.contact_uid, opt);
4206
4206
 
4207
- if (!recipient_contact_ret?.docs?.length) {
4208
- throw new Error('sender contact id not found');
4209
- }
4210
- const recipient_contact_id = sender_contact_ret?.docs[0]._id;
4207
+ // if (!recipient_contact_ret?.docs?.length) {
4208
+ // throw new Error('sender contact id not found');
4209
+ // }
4210
+ // const recipient_contact_id = sender_contact_ret?.docs[0]._id;
4211
+
4212
+ recipient_uid = contact_doc.connection_uid;
4211
4213
 
4212
4214
  const app_id = await account_module.get_account_default_project_id(receiver_contact_doc.contact_uid);
4213
4215
  const save_ret = await db_module.save_app_couch_doc(app_id, { ...conversation_doc, ...{ uid: receiver_contact_doc.contact_uid, reference_id: sender_contact_id } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4273",
3
+ "version": "1.1.4274",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",