@xuda.io/ai_module 1.1.4201 → 1.1.4202

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 +12 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4384,7 +4384,18 @@ const update_conversation_mood_level = async function (conversation_id, prompt,
4384
4384
  await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
4385
4385
 
4386
4386
  if (update_contact) {
4387
- const receiver_contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [sender_uid, receiver_uid] });
4387
+ // const receiver_contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [sender_uid, receiver_uid] });
4388
+
4389
+ const opt = {
4390
+ selector: {
4391
+ docType: 'contact',
4392
+ stat: 3,
4393
+ contact_uid: receiver_uid,
4394
+ },
4395
+ limit: 1,
4396
+ fields: ['_id'],
4397
+ };
4398
+ const receiver_contact_ret = await account_module.find_contact_query(sender_uid, opt);
4388
4399
 
4389
4400
  if (!receiver_contact_ret?.rows?.length) {
4390
4401
  throw new Error('receiver contact id not found');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4201",
3
+ "version": "1.1.4202",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",