@xuda.io/account_module 1.2.1772 → 1.2.1773

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 +5 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2098,7 +2098,7 @@ export const add_contact = async function (req, job_id, headers) {
2098
2098
  /////////////////
2099
2099
 
2100
2100
  let is_spam = false;
2101
- let email_type_info;
2101
+ // let email_type_info;
2102
2102
  let account_type_info;
2103
2103
  let account_type;
2104
2104
  let cached_contact;
@@ -2121,9 +2121,9 @@ export const add_contact = async function (req, job_id, headers) {
2121
2121
 
2122
2122
  if (_.isEmpty(cached_contact)) {
2123
2123
  if (metadata.subject && !metadata.is_sent) {
2124
- email_type_info = await ai_module.detect_email_type(uid, name, email, account_profile_info, '', metadata?.subject);
2125
- is_spam = email_type_info.email_type === 'spam' || email_type_info.email_type === 'promotional';
2126
- // is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
2124
+ // email_type_info = await ai_module.detect_email_type(uid, name, email, account_profile_info, '', metadata?.subject);
2125
+ // is_spam = email_type_info.email_type === 'spam' || email_type_info.email_type === 'promotional';
2126
+ is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
2127
2127
  }
2128
2128
  if (!is_spam) {
2129
2129
  account_type_info = await ai_module.analyze_email_account_type(uid, name, email, account_profile_info, metadata?.summarized_body);
@@ -2162,7 +2162,7 @@ export const add_contact = async function (req, job_id, headers) {
2162
2162
  account_profiles: [account_profile_obj._id],
2163
2163
  account_type: cached_contact?.account_type || account_type,
2164
2164
  account_type_info: cached_contact?.account_type_info || account_type_info,
2165
- email_type_info: cached_contact?.email_type_info || email_type_info,
2165
+ // email_type_info: cached_contact?.email_type_info || email_type_info,
2166
2166
  };
2167
2167
  if (!_.isEmpty(cached_contact?.business_info)) {
2168
2168
  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.1772",
3
+ "version": "1.2.1773",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {