@xuda.io/account_module 1.2.1715 → 1.2.1716

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 +10 -9
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2094,20 +2094,21 @@ export const add_contact = async function (req, job_id, headers) {
2094
2094
  } else {
2095
2095
  // contact without use account
2096
2096
  cached_contact = await get_xuda_cache(uid, 'contact', email, 'metadata');
2097
- if (_.isEmpty(cached_contact) && account_type === 'business') {
2098
- const domain = email.includes('@') ? email.split('@')[1] : '';
2099
- cached_contact = await get_xuda_cache(uid, 'contact', domain, 'metadata');
2100
- }
2097
+ // if (_.isEmpty(cached_contact) && account_type === 'business') {
2098
+ // const domain = email.includes('@') ? email.split('@')[1] : '';
2099
+ // cached_contact = await get_xuda_cache(uid, 'contact', domain, 'metadata');
2100
+ // }
2101
2101
 
2102
2102
  if (_.isEmpty(cached_contact)) {
2103
2103
  if (metadata.subject && !metadata.is_sent) {
2104
2104
  is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
2105
2105
  }
2106
-
2107
- account_type_info = await ai_module.analyze_email_account_type(uid, name, email, account_profile_info, metadata?.summarized_body);
2108
- account_type = account_type_info.account_type;
2109
- // const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
2110
- // account_type = is_business ? 'business' : 'personal';
2106
+ if (!is_spam) {
2107
+ account_type_info = await ai_module.analyze_email_account_type(uid, name, email, account_profile_info, metadata?.summarized_body);
2108
+ account_type = account_type_info.account_type;
2109
+ // const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
2110
+ // account_type = is_business ? 'business' : 'personal';
2111
+ }
2111
2112
  }
2112
2113
  }
2113
2114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1715",
3
+ "version": "1.2.1716",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {