@xuda.io/account_module 1.2.1513 → 1.2.1514

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 +17 -17
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2198,23 +2198,23 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
2198
2198
  if (!contact_obj.profile_avatar) {
2199
2199
  const cache = await get_picture_cache(uid, 'profile_avatar', contact_obj.email, contact_obj.name);
2200
2200
  let file_ret = { code: 1, data: cache };
2201
-
2202
- file_ret = await ai_module.get_profile_avatar(
2203
- contact_obj.profile_picture,
2204
- uid,
2205
- '',
2206
- account_profile_info,
2207
- contact_obj.account_type,
2208
- 'contact',
2209
- contact_id,
2210
- { bio: contact_obj.bio, country: contact_obj.country, mainCategory: contact_obj.mainCategory, subCategory: contact_obj.subCategory },
2211
- contact_obj.business_size,
2212
- contact_obj.name,
2213
- contact_obj.email,
2214
- job_id,
2215
- headers,
2216
- );
2217
-
2201
+ if (!cache) {
2202
+ file_ret = await ai_module.get_profile_avatar(
2203
+ contact_obj.profile_picture,
2204
+ uid,
2205
+ '',
2206
+ account_profile_info,
2207
+ contact_obj.account_type,
2208
+ 'contact',
2209
+ contact_id,
2210
+ { bio: contact_obj.bio, country: contact_obj.country, mainCategory: contact_obj.mainCategory, subCategory: contact_obj.subCategory },
2211
+ contact_obj.business_size,
2212
+ contact_obj.name,
2213
+ contact_obj.email,
2214
+ job_id,
2215
+ headers,
2216
+ );
2217
+ }
2218
2218
  if (file_ret.code < 0) {
2219
2219
  throw new Error(file_ret.data);
2220
2220
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1513",
3
+ "version": "1.2.1514",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {