@xuda.io/account_module 1.2.1443 → 1.2.1445

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 +18 -8
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1940,7 +1940,7 @@ setTimeout(async () => {
1940
1940
  // let _design = await db_module.get_app_couch_doc_native(app_id, '_design/xuda');
1941
1941
  // ret = _design.views.ai_chat_usage;
1942
1942
  // console.log(_design.views.ai_chat_usage);
1943
- ret = await set_contact_profile_picture(uid, 'cnt_2d21d55f8f0cdaf65a7a69f696166840', {}, null, {});
1943
+ // ret = await set_contact_profile_picture(uid, 'cnt_2d21d55f8f0cdaf65a7a69f696166840', {}, null, {});
1944
1944
  console.log(ret);
1945
1945
  }, 1000);
1946
1946
 
@@ -2020,6 +2020,16 @@ export const add_contact = async function (req, job_id, headers) {
2020
2020
  // profile_picture = profile_picture_obj.url;
2021
2021
  // }
2022
2022
  }
2023
+ if (account_type === 'business' && !is_spam) {
2024
+ const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2025
+ const { business_size, business_category, business_sub_category, business_country, business_bio } = business_info;
2026
+ contact_obj.mainCategory = business_category;
2027
+ contact_obj.subCategory = business_sub_category;
2028
+ contact_obj.business_size = business_size;
2029
+ contact_obj.country = business_country;
2030
+ contact_obj.bio = business_bio;
2031
+ }
2032
+
2023
2033
  const d = Date.now();
2024
2034
  const doc = {
2025
2035
  _id: await _common.xuda_get_uuid('contact'),
@@ -2182,13 +2192,13 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
2182
2192
  // get business info
2183
2193
 
2184
2194
  if (!contact_obj.profile_avatar) {
2185
- const business_info = await get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2186
- const { business_size, business_category, business_sub_category, business_country, business_bio } = business_info;
2187
- contact_obj.mainCategory = business_category;
2188
- contact_obj.subCategory = business_sub_category;
2189
- contact_obj.business_size = business_size;
2190
- contact_obj.country = business_country;
2191
- contact_obj.bio = business_bio;
2195
+ // const business_info = await get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
2196
+ // const { business_size, business_category, business_sub_category, business_country, business_bio } = business_info;
2197
+ // contact_obj.mainCategory = business_category;
2198
+ // contact_obj.subCategory = business_sub_category;
2199
+ // contact_obj.business_size = business_size;
2200
+ // contact_obj.country = business_country;
2201
+ // contact_obj.bio = business_bio;
2192
2202
 
2193
2203
  const file_ret = await ai_module.get_profile_avatar(
2194
2204
  profile_picture,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1443",
3
+ "version": "1.2.1445",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {