@xuda.io/account_module 1.2.948 → 1.2.950

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 +7 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1946,6 +1946,8 @@ export const add_contact = async function (req, job_id, headers) {
1946
1946
  team_req_id,
1947
1947
  metadata,
1948
1948
  is_spam,
1949
+ profile_avatar,
1950
+ profile_avatar_obj,
1949
1951
  };
1950
1952
  const ret = await db_module.save_couch_doc('xuda_contacts', doc);
1951
1953
 
@@ -1956,9 +1958,11 @@ export const add_contact = async function (req, job_id, headers) {
1956
1958
  // account_info_ret.data.profile_avatar_stat = 2;
1957
1959
  ai_module.convert_profile_image_to_avatar({ url: account_info_ret.data.profile_picture, uid, account_obj: { _id: contact_uid, account_info: account_info_ret.data } }, job_id, headers);
1958
1960
  } else {
1959
- // create factual avatar
1960
- if (!is_spam) {
1961
- ai_module.update_thumbnail('contact', doc, app_id, uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact', app_id]);
1961
+ if (!doc.profile_avatar) {
1962
+ // create factual avatar
1963
+ if (!is_spam) {
1964
+ ai_module.update_thumbnail('contact', doc, app_id, uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact', app_id]);
1965
+ }
1962
1966
  }
1963
1967
  }
1964
1968
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.948",
3
+ "version": "1.2.950",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {