@xuda.io/account_module 1.2.1379 → 1.2.1380

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 +8 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1986,6 +1986,13 @@ export const add_contact = async function (req, job_id, headers) {
1986
1986
  if (account_info_ret.code < 0) {
1987
1987
  throw new Error(`account ${contact_uid} not found`);
1988
1988
  }
1989
+ if (!account_info_ret.data.account_info.profile_picture) {
1990
+ profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info: account_info_ret.data.account_info }, account_profile_info, job_id, headers);
1991
+ profile_picture = profile_picture_obj.url;
1992
+ account_info_ret.data.account_info.profile_picture_obj = profile_picture_obj;
1993
+ account_info_ret.data.account_info.profile_picture = profile_picture;
1994
+ const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
1995
+ }
1989
1996
  } else {
1990
1997
  // contact without use account
1991
1998
 
@@ -2003,7 +2010,7 @@ export const add_contact = async function (req, job_id, headers) {
2003
2010
  // }
2004
2011
  // }
2005
2012
  if (!is_spam) {
2006
- profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context }, account_profile_info, job_id, headers);
2013
+ profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata }, account_profile_info, job_id, headers);
2007
2014
  profile_picture = profile_picture_obj.url;
2008
2015
  }
2009
2016
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1379",
3
+ "version": "1.2.1380",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {