@xuda.io/account_module 1.2.1626 → 1.2.1628

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 -3
  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,
@@ -1998,10 +1998,10 @@ export const add_contact = async function (req, job_id, headers) {
1998
1998
  source,
1999
1999
  team_req_id,
2000
2000
  metadata,
2001
- is_spam,
2001
+ is_spam: cached_contact?.is_spam || 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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1626",
3
+ "version": "1.2.1628",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {