@xuda.io/account_module 1.2.1372 → 1.2.1374

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 +9 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1977,6 +1977,7 @@ export const add_contact = async function (req, job_id, headers) {
1977
1977
  /////////////////
1978
1978
 
1979
1979
  let is_spam = false;
1980
+ let profile_picture, profile_picture_obj;
1980
1981
  let profile_avatar, profile_avatar_obj;
1981
1982
  let account_info_ret;
1982
1983
  let account_type;
@@ -1987,6 +1988,7 @@ export const add_contact = async function (req, job_id, headers) {
1987
1988
  }
1988
1989
  } else {
1989
1990
  // contact without use account
1991
+
1990
1992
  if (metadata.subject && !metadata.is_sent) {
1991
1993
  is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
1992
1994
  }
@@ -2000,6 +2002,12 @@ export const add_contact = async function (req, job_id, headers) {
2000
2002
  // profile_avatar_obj == contact.value.profile_avatar_obj;
2001
2003
  // }
2002
2004
  // }
2005
+ if (!is_spam) {
2006
+ if (account_type === 'business') {
2007
+ } else {
2008
+ }
2009
+ profile_picture_obj = await get_profile_picture(uid, 'business', 'ioshka media', {}, account_profile_info, job_id, headers);
2010
+ }
2003
2011
  }
2004
2012
  const d = Date.now();
2005
2013
  const doc = {
@@ -2027,9 +2035,8 @@ export const add_contact = async function (req, job_id, headers) {
2027
2035
  const save_ret = await save_contact(uid, doc);
2028
2036
 
2029
2037
  if (!account_info_ret?.data?.profile_avatar) {
2030
- const app_id = await get_account_default_project_id(uid);
2031
2038
  const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2032
- if (account_info_ret?.data?.profile_avatar) {
2039
+ if (account_info_ret?.data?.profile_picture) {
2033
2040
  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);
2034
2041
  } else {
2035
2042
  if (!doc.profile_avatar) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1372",
3
+ "version": "1.2.1374",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {