@xuda.io/ai_module 1.1.5549 → 1.1.5551

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 +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4101,7 +4101,7 @@ const chat_email = async function (req, job_id, headers) {
4101
4101
  }
4102
4102
 
4103
4103
  if (conversation_doc.reference_type === 'contacts' && from_mailbox) {
4104
- auto_response(uid, profile_id, conversation_id);
4104
+ auto_response(uid, profile_id, conversation_doc.reference_id, conversation_id);
4105
4105
  }
4106
4106
 
4107
4107
  return save_ret;
@@ -5177,7 +5177,7 @@ const add_conversation_item = async function (uid, profile_id, conversation_id,
5177
5177
  }
5178
5178
  };
5179
5179
 
5180
- const auto_response = async function (uid, profile_id, conversation_id) {
5180
+ const auto_response = async function (uid, profile_id, contact_id, conversation_id) {
5181
5181
  const account_profile_info = await get_active_account_profile_info(uid, profile_id);
5182
5182
 
5183
5183
  const account_profile_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, profile_id);
@@ -5188,6 +5188,7 @@ const auto_response = async function (uid, profile_id, conversation_id) {
5188
5188
  if (account_profile_doc.auto_respond_mode === 'when_offline' && account_doc.socket_id) return;
5189
5189
  if (account_profile_doc.auto_respond_mode !== 'always') return;
5190
5190
 
5191
+ const contact_doc = await get_contact_info(account_profile_info.uid, null, contact_id);
5191
5192
  ///
5192
5193
  };
5193
5194
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5549",
3
+ "version": "1.1.5551",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",