@xuda.io/account_module 1.2.1197 → 1.2.1199

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
@@ -1924,9 +1924,10 @@ export const unpin_contact = async function (req) {
1924
1924
  export const add_contact = async function (req, job_id, headers) {
1925
1925
  try {
1926
1926
  const { uid, email, name, stat, contact_uid, context, source, team_req_id, metadata = {} } = req;
1927
- const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1928
1927
  const account_profile_info = await get_active_account_profile_info(uid);
1929
1928
 
1929
+ const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [account_profile_info.uid, email] });
1930
+
1930
1931
  if (contact_ret.rows.length) {
1931
1932
  throw new Error('contact already exist active or deleted');
1932
1933
  }
@@ -1993,7 +1994,7 @@ export const add_contact = async function (req, job_id, headers) {
1993
1994
  if (!doc.profile_avatar) {
1994
1995
  // create factual avatar
1995
1996
  if (!is_spam) {
1996
- ai_module.update_thumbnail('contact', doc, account_profile_info.app_id, uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact', account_profile_info.app_id], account_profile_info);
1997
+ ai_module.update_thumbnail('contact', doc, account_profile_info.app_id, account_profile_info.uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact', account_profile_info.app_id], account_profile_info);
1997
1998
  }
1998
1999
  }
1999
2000
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1197",
3
+ "version": "1.2.1199",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {