@xuda.io/account_module 1.2.1801 → 1.2.1803

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 +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1146,8 +1146,8 @@ const get_contact_pattern = async function (doc) {
1146
1146
  } else if (doc.profile_avatar_stat === 1) {
1147
1147
  ret = `pending-pattern.png`;
1148
1148
  } else if (doc.profile_avatar_stat === 2) {
1149
- if (doc.profile_avatar_stat === 2) {
1150
- ret = `processing-pattern.png`;
1149
+ if (!doc.profile_avatar_stat_ts || Date.now() - doc.profile_avatar_stat_ts > 1000 * 60 * 5) {
1150
+ ret = `error-pattern.png`;
1151
1151
  } else {
1152
1152
  ret = `processing-pattern.png`;
1153
1153
  }
@@ -2046,6 +2046,7 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
2046
2046
  account_obj = account_obj3;
2047
2047
  account_info = account_obj.account_info;
2048
2048
 
2049
+ if (!_.isObject(file_ret.data)) throw new Error('file_ret not an object');
2049
2050
  account_info.profile_avatar_obj = file_ret.data;
2050
2051
  account_info.profile_avatar = account_info.profile_avatar_obj.file_url;
2051
2052
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1801",
3
+ "version": "1.2.1803",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {