@xuda.io/account_module 1.2.1787 → 1.2.1789

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 +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2158,7 +2158,7 @@ export const add_contact = async function (req, job_id, headers) {
2158
2158
  const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
2159
2159
  account_type = is_business ? 'business' : 'personal';
2160
2160
  if (is_business) {
2161
- business_info = await ai_module.get_business_info(uid, '', contact_obj.email, account_profile_info);
2161
+ business_info = await ai_module.get_business_info(uid, '', email, account_profile_info);
2162
2162
  if (business_info.business_name !== 'Not available') {
2163
2163
  //&& !identifyPersonalProvider(business_info.business_domain)
2164
2164
  business_has_person = await ai_module.is_business_contact_has_person(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
@@ -2294,7 +2294,11 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
2294
2294
  if (!contact_obj.profile_picture) {
2295
2295
  let cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.email, 'file');
2296
2296
  if (!cache && contact_obj?.business_info?.business_domain) {
2297
- cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.business_info.business_domain, 'file');
2297
+ if (!identifyPersonalProvider(contact_obj.business_info.business_domain)) {
2298
+ cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.business_info.business_domain, 'file');
2299
+ } else {
2300
+ cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.business_info.business_name, 'file');
2301
+ }
2298
2302
  }
2299
2303
  let file_ret = { code: 1, data: cache };
2300
2304
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1787",
3
+ "version": "1.2.1789",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {