@xuda.io/account_module 1.2.1849 → 1.2.1850

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 -44
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2210,33 +2210,9 @@ export const add_contact = async function (req, job_id, headers) {
2210
2210
  account_profiles: [account_profile_obj._id],
2211
2211
  account_type: cached_contact?.account_type || account_type,
2212
2212
  profile_avatar_stat: 0,
2213
- // account_type_info: cached_contact?.account_type_info || account_type_info,
2214
- // email_type_info: cached_contact?.email_type_info || email_type_info,
2215
2213
  };
2216
- // if (!_.isEmpty(cached_contact?.business_info)) {
2217
- // contact_obj.business_info = _.cloneDeep(cached_contact.business_info);
2218
- // } else {
2219
- if (!is_spam) {
2220
- // if (account_type === 'business') {
2221
- // contact_obj.business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2222
- // save_xuda_cache(uid, 'contact', contact_obj.domain, null, contact_obj);
2223
-
2224
- // // const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2225
- // // if (business_info) {
2226
- // // const { business_size, business_category, business_sub_category, business_country, business_bio, business_name } = business_info;
2227
- // // contact_obj.mainCategory = business_category;
2228
- // // contact_obj.subCategory = business_sub_category;
2229
- // // contact_obj.business_size = business_size;
2230
- // // contact_obj.country = business_country;
2231
- // // contact_obj.bio = business_bio;
2232
- // // contact_obj.business_name = business_name;
2233
-
2234
- // // if (!contact_obj.name) {
2235
- // // contact_obj.name = business_name;
2236
- // // }
2237
- // // }
2238
- // }
2239
2214
 
2215
+ if (!is_spam) {
2240
2216
  if (account_type === 'personal' || contact_obj?.business_has_person) {
2241
2217
  contact_obj.person_info = await ai_module.get_person_info(uid, contact_obj.name, contact_obj.email, account_profile_info, metadata?.summarized_body, { light: true });
2242
2218
  if (!contact_obj.name) {
@@ -2249,25 +2225,6 @@ export const add_contact = async function (req, job_id, headers) {
2249
2225
  }
2250
2226
  }
2251
2227
 
2252
- // if (account_type === 'personal') {
2253
- // if (!contact_obj.name) {
2254
- // contact_obj.name = await ai_module.get_name_from_email_addr(uid, contact_obj.email, account_profile_info);
2255
- // }
2256
- // }
2257
- // }
2258
- // else {
2259
- // // get from cache
2260
-
2261
- // contact_obj.business_info = _.cloneDeep(cached_contact.business_info);
2262
-
2263
- // // contact_obj.mainCategory = cached_contact.mainCategory;
2264
- // // contact_obj.subCategory = cached_contact.subCategory;
2265
- // // contact_obj.business_size = cached_contact.business_size;
2266
- // // contact_obj.country = cached_contact.country;
2267
- // // contact_obj.bio = cached_contact.bio;
2268
- // // contact_obj.business_name = cached_contact.business_name;
2269
- // // // contact_obj.is_spam = cached_contact.is_spam;
2270
- // }
2271
2228
  const save_ret = await save_contact(uid, contact_obj);
2272
2229
  save_xuda_cache(uid, 'contact', contact_obj.email, null, contact_obj);
2273
2230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1849",
3
+ "version": "1.2.1850",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {