@xuda.io/account_module 1.2.921 → 1.2.923

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
@@ -1037,7 +1037,7 @@ export const read_emails = async function (req, job_id, headers) {
1037
1037
  // uid,
1038
1038
  // });
1039
1039
  // }
1040
- await add_contact({ uid, name, email }, job_id, headers);
1040
+ await add_contact({ uid, name, email, metadata: { subject } }, job_id, headers);
1041
1041
  }
1042
1042
  }
1043
1043
  };
@@ -1886,7 +1886,7 @@ export const unpin_contact = async function (req) {
1886
1886
  export const add_contact = async function (req, job_id, headers) {
1887
1887
  try {
1888
1888
  const { uid, email, name, stat, contact_uid, context, source, team_req_id, metadata } = req;
1889
- const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: [uid, email] });
1889
+ const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1890
1890
 
1891
1891
  if (contact_ret.rows.length) {
1892
1892
  throw new Error('contact already exist active or deleted');
@@ -1944,7 +1944,7 @@ export const update_contact = async function (req) {
1944
1944
  const { uid, email, contact_uid, stat, team_req_id } = req;
1945
1945
  var contact_ret;
1946
1946
  if (email) {
1947
- contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: [uid, email] });
1947
+ contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1948
1948
  } else if (contact_uid) {
1949
1949
  contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [uid, contact_uid] });
1950
1950
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.921",
3
+ "version": "1.2.923",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {