@xuda.io/account_module 1.2.1190 → 1.2.1192

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 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1925,6 +1925,7 @@ 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
1927
  const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1928
+ const account_profile_info = await get_active_account_profile_info(uid);
1928
1929
 
1929
1930
  if (contact_ret.rows.length) {
1930
1931
  throw new Error('contact already exist active or deleted');
@@ -1977,6 +1978,7 @@ export const add_contact = async function (req, job_id, headers) {
1977
1978
  is_spam,
1978
1979
  profile_avatar,
1979
1980
  profile_avatar_obj,
1981
+ account_profile_info,
1980
1982
  };
1981
1983
  const ret = await db_module.save_couch_doc('xuda_contacts', doc);
1982
1984
 
@@ -1985,7 +1987,7 @@ export const add_contact = async function (req, job_id, headers) {
1985
1987
  const ai_module = await import(`${module_path}/ai_module/index.mjs`);
1986
1988
  if (account_info_ret?.data?.profile_avatar) {
1987
1989
  // account_info_ret.data.profile_avatar_stat = 2;
1988
- ai_module.create_profile_avatar({ url: account_info_ret.data.profile_picture, uid, account_obj: { _id: contact_uid, account_info: account_info_ret.data } }, job_id, headers);
1990
+ ai_module.create_profile_avatar({ url: account_info_ret.data.profile_picture, uid, account_obj: { _id: contact_uid, account_info: account_info_ret.data }, account_profile_info }, job_id, headers);
1989
1991
  } else {
1990
1992
  if (!doc.profile_avatar) {
1991
1993
  // create factual avatar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1190",
3
+ "version": "1.2.1192",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {