@xuda.io/account_module 1.2.1625 → 1.2.1627

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 +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1985,7 +1985,7 @@ export const add_contact = async function (req, job_id, headers) {
1985
1985
  const contact_obj = {
1986
1986
  _id: await _common.xuda_get_uuid('contact'),
1987
1987
  email,
1988
- name: cached_contact.name || name,
1988
+ name: cached_contact?.name || name,
1989
1989
  stat: stat || 3,
1990
1990
  date_created: Date.now(metadata.email_data),
1991
1991
  ts: d,
@@ -2001,7 +2001,7 @@ export const add_contact = async function (req, job_id, headers) {
2001
2001
  is_spam,
2002
2002
 
2003
2003
  account_profiles: [account_profile_obj._id],
2004
- account_type,
2004
+ account_type: cached_contact?.account_type || account_type,
2005
2005
  };
2006
2006
  if (_.isEmpty(cached_contact)) {
2007
2007
  if (account_type === 'business' && !is_spam) {
@@ -2025,6 +2025,7 @@ export const add_contact = async function (req, job_id, headers) {
2025
2025
  }
2026
2026
  }
2027
2027
  } else {
2028
+ // get from cache
2028
2029
  contact_obj.mainCategory = cached_contact.mainCategory;
2029
2030
  contact_obj.subCategory = cached_contact.subCategory;
2030
2031
  contact_obj.business_size = cached_contact.business_size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1625",
3
+ "version": "1.2.1627",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {