@xuda.io/account_module 1.2.1720 → 1.2.1721

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
@@ -2079,7 +2079,7 @@ export const add_contact = async function (req, job_id, headers) {
2079
2079
  /////////////////
2080
2080
 
2081
2081
  let is_spam = false;
2082
- let email_type;
2082
+ let email_type_info;
2083
2083
  let account_type_info;
2084
2084
  let account_type;
2085
2085
  let cached_contact;
@@ -2102,7 +2102,7 @@ export const add_contact = async function (req, job_id, headers) {
2102
2102
  debugger;
2103
2103
  if (_.isEmpty(cached_contact)) {
2104
2104
  if (metadata.subject && !metadata.is_sent) {
2105
- email_type = await ai_module.detect_email_type(uid, name, email, account_profile_info, metadata?.summarized_body, metadata?.subject);
2105
+ email_type_info = await ai_module.detect_email_type(uid, name, email, account_profile_info, metadata?.summarized_body, metadata?.subject);
2106
2106
  is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
2107
2107
  }
2108
2108
  if (!is_spam) {
@@ -2142,6 +2142,7 @@ export const add_contact = async function (req, job_id, headers) {
2142
2142
  account_profiles: [account_profile_obj._id],
2143
2143
  account_type: cached_contact?.account_type || account_type,
2144
2144
  account_type_info: cached_contact?.account_type_info || account_type_info,
2145
+ email_type_info: cached_contact?.email_type_info || email_type_info,
2145
2146
  };
2146
2147
  if (!_.isEmpty(cached_contact?.business_info)) {
2147
2148
  contact_obj.business_info = _.cloneDeep(cached_contact.business_info);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1720",
3
+ "version": "1.2.1721",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {