@xuda.io/account_module 1.2.1808 → 1.2.1810
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.
- package/index.mjs +7 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1144,7 +1144,11 @@ const get_contact_pattern = async function (doc) {
|
|
|
1144
1144
|
const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
|
|
1145
1145
|
ret = shared_from_uid_ret.data.profile_avatar;
|
|
1146
1146
|
} else if (doc.profile_avatar_stat === 1) {
|
|
1147
|
-
|
|
1147
|
+
if (!doc.profile_avatar_stat_ts || Date.now() - doc.profile_avatar_stat_ts > 1000 * 60 * 5) {
|
|
1148
|
+
ret = `error-pattern.png`;
|
|
1149
|
+
} else {
|
|
1150
|
+
ret = `pending-pattern.png`;
|
|
1151
|
+
}
|
|
1148
1152
|
} else if (doc.profile_avatar_stat === 2) {
|
|
1149
1153
|
if (!doc.profile_avatar_stat_ts || Date.now() - doc.profile_avatar_stat_ts > 1000 * 60 * 5) {
|
|
1150
1154
|
ret = `error-pattern.png`;
|
|
@@ -2312,7 +2316,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2312
2316
|
}
|
|
2313
2317
|
}
|
|
2314
2318
|
let file_ret = { code: 1, data: cache };
|
|
2315
|
-
|
|
2319
|
+
debugger;
|
|
2316
2320
|
if (!cache) {
|
|
2317
2321
|
// if personal, return profile pic, if business return logo
|
|
2318
2322
|
file_ret = await ai_module.get_profile_picture(uid, contact_obj.account_type, contact_obj?.business_info?.business_domain || contact_obj.name, { email: contact_obj.email, metadata: contact_obj }, account_profile_info, job_id, headers);
|
|
@@ -2359,7 +2363,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2359
2363
|
}
|
|
2360
2364
|
|
|
2361
2365
|
let file_ret = { code: 1, data: cache };
|
|
2362
|
-
|
|
2366
|
+
|
|
2363
2367
|
if (!cache) {
|
|
2364
2368
|
file_ret = await ai_module.get_profile_avatar(
|
|
2365
2369
|
contact_obj.profile_picture,
|