@xuda.io/account_module 1.2.1632 → 1.2.1634

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2149,7 +2149,10 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
2149
2149
  }
2150
2150
  await update_contact_profile_picture_status(uid, contact_id, 2);
2151
2151
  if (!contact_obj.profile_picture) {
2152
- const cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.email, 'file');
2152
+ let cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.email, 'file');
2153
+ if (!cache && contact_obj.business_name) {
2154
+ cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.business_name, 'file');
2155
+ }
2153
2156
  let file_ret = { code: 1, data: cache };
2154
2157
 
2155
2158
  if (!cache) {
@@ -2193,7 +2196,9 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
2193
2196
  job_id,
2194
2197
  headers,
2195
2198
  );
2196
- // save_xuda_cache(uid, 'profile_avatar', contact_obj.name, file_ret.data, { account_type: contact_obj.account_type, type: 'contact' });
2199
+ if (contact_obj.business_name) {
2200
+ save_xuda_cache(uid, 'profile_avatar', contact_obj.business_name, file_ret.data, { account_type: contact_obj.account_type, type: 'contact' });
2201
+ }
2197
2202
  save_xuda_cache(uid, 'profile_avatar', contact_obj.email, file_ret.data, { account_type: contact_obj.account_type, type: 'contact' });
2198
2203
  }
2199
2204
  if (file_ret.code < 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1632",
3
+ "version": "1.2.1634",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {