@xuda.io/account_module 1.2.1701 → 1.2.1703

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 +23 -21
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2128,20 +2128,21 @@ export const add_contact = async function (req, job_id, headers) {
2128
2128
  };
2129
2129
  if (_.isEmpty(cached_contact)) {
2130
2130
  if (account_type === 'business' && !is_spam) {
2131
- const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2132
- if (business_info) {
2133
- const { business_size, business_category, business_sub_category, business_country, business_bio, business_name } = business_info;
2134
- contact_obj.mainCategory = business_category;
2135
- contact_obj.subCategory = business_sub_category;
2136
- contact_obj.business_size = business_size;
2137
- contact_obj.country = business_country;
2138
- contact_obj.bio = business_bio;
2139
- contact_obj.business_name = business_name;
2140
-
2141
- if (!contact_obj.name) {
2142
- contact_obj.name = business_name;
2143
- }
2144
- }
2131
+ contact_obj.business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2132
+ // const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2133
+ // if (business_info) {
2134
+ // const { business_size, business_category, business_sub_category, business_country, business_bio, business_name } = business_info;
2135
+ // contact_obj.mainCategory = business_category;
2136
+ // contact_obj.subCategory = business_sub_category;
2137
+ // contact_obj.business_size = business_size;
2138
+ // contact_obj.country = business_country;
2139
+ // contact_obj.bio = business_bio;
2140
+ // contact_obj.business_name = business_name;
2141
+
2142
+ // if (!contact_obj.name) {
2143
+ // contact_obj.name = business_name;
2144
+ // }
2145
+ // }
2145
2146
  } else {
2146
2147
  if (!contact_obj.name) {
2147
2148
  contact_obj.name = '';
@@ -2155,13 +2156,14 @@ export const add_contact = async function (req, job_id, headers) {
2155
2156
  }
2156
2157
  } else {
2157
2158
  // get from cache
2158
- contact_obj.mainCategory = cached_contact.mainCategory;
2159
- contact_obj.subCategory = cached_contact.subCategory;
2160
- contact_obj.business_size = cached_contact.business_size;
2161
- contact_obj.country = cached_contact.country;
2162
- contact_obj.bio = cached_contact.bio;
2163
- contact_obj.business_name = cached_contact.business_name;
2164
- // contact_obj.is_spam = cached_contact.is_spam;
2159
+ contact_obj.business_info = _.cloneDeep(cached_contact.business_info);
2160
+ // contact_obj.mainCategory = cached_contact.mainCategory;
2161
+ // contact_obj.subCategory = cached_contact.subCategory;
2162
+ // contact_obj.business_size = cached_contact.business_size;
2163
+ // contact_obj.country = cached_contact.country;
2164
+ // contact_obj.bio = cached_contact.bio;
2165
+ // contact_obj.business_name = cached_contact.business_name;
2166
+ // // contact_obj.is_spam = cached_contact.is_spam;
2165
2167
  }
2166
2168
  const save_ret = await save_contact(uid, contact_obj);
2167
2169
  save_xuda_cache(uid, 'contact', contact_obj.email, null, contact_obj);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1701",
3
+ "version": "1.2.1703",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {