@xuda.io/account_module 1.2.1842 → 1.2.1844

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 +1 -12
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2157,21 +2157,13 @@ export const add_contact = async function (req, job_id, headers) {
2157
2157
 
2158
2158
  // contact without use account
2159
2159
  cached_contact = await get_xuda_cache(uid, 'contact', email, 'metadata');
2160
- // if (_.isEmpty(cached_contact) && account_type === 'business') {
2161
- // const domain = email.includes('@') ? email.split('@')[1] : '';
2162
- // cached_contact = await get_xuda_cache(uid, 'contact', domain, 'metadata');
2163
- // }
2164
2160
 
2165
2161
  if (_.isEmpty(cached_contact)) {
2166
2162
  if (!is_spam && metadata.subject && !metadata.is_sent && !metadata.is_answered && !metadata.not_junk) {
2167
- // email_type_info = await ai_module.detect_email_type(uid, name, email, account_profile_info, '', metadata?.subject);
2168
- // is_spam = email_type_info.email_type === 'spam' || email_type_info.email_type === 'promotional';
2163
+ // deep search for spam
2169
2164
  is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
2170
2165
  }
2171
2166
  if (!is_spam) {
2172
- // account_type_info = await ai_module.analyze_email_account_type(uid, name, email, account_profile_info, metadata?.summarized_body);
2173
- // account_type = account_type_info.account_type;
2174
-
2175
2167
  const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
2176
2168
  account_type = is_business ? 'business' : 'personal';
2177
2169
  if (is_business) {
@@ -2192,9 +2184,6 @@ export const add_contact = async function (req, job_id, headers) {
2192
2184
  cached_contact = await get_xuda_cache(uid, 'contact', business_info.business_name, 'metadata');
2193
2185
  }
2194
2186
  }
2195
-
2196
- // const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
2197
- // account_type = is_business ? 'business' : 'personal';
2198
2187
  }
2199
2188
  }
2200
2189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1842",
3
+ "version": "1.2.1844",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {