@xuda.io/ai_module 1.1.4196 → 1.1.4198

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 +13 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4152,8 +4152,6 @@ export const create_conversation = async function (req, job_id, headers) {
4152
4152
 
4153
4153
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
4154
4154
 
4155
- // const app_id = await account_module.get_account_default_project_id(uid);
4156
-
4157
4155
  try {
4158
4156
  const conversation_obj = await client.conversations.create();
4159
4157
  const t = Date.now();
@@ -4188,7 +4186,19 @@ export const create_conversation = async function (req, job_id, headers) {
4188
4186
  }
4189
4187
  // write conversation to receiver
4190
4188
 
4191
- const sender_contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [receiver_contact_doc.contact_uid, uid] });
4189
+ // const sender_contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [receiver_contact_doc.contact_uid, uid] });
4190
+
4191
+ const opt = {
4192
+ selector: {
4193
+ docType: 'contact',
4194
+ stat: 3,
4195
+ contact_uid: uid,
4196
+ },
4197
+ limit: 1,
4198
+ fields: ['_id'],
4199
+ };
4200
+ const sender_contact_ret = await account_module.find_contact_query(receiver_contact_doc.contact_uid, opt);
4201
+
4192
4202
  if (!sender_contact_ret?.rows?.length) {
4193
4203
  throw new Error('sender contact id not found');
4194
4204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4196",
3
+ "version": "1.1.4198",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",