@xuda.io/account_module 1.2.1727 → 1.2.1729
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 +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -55,7 +55,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
55
55
|
|
|
56
56
|
// delete data.profile_avatar;
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
const account_profile_info = await get_active_account_profile_info(uid);
|
|
59
59
|
|
|
60
60
|
function validate_input(string, max_length, is_mandatory, is_pass) {
|
|
61
61
|
if (!/^[a-zA-Z0-9,.@ ]*$/.test(string) && !is_pass) {
|
|
@@ -199,7 +199,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
199
199
|
if (account_obj.account_info?.profile_picture) {
|
|
200
200
|
if (!account_obj.account_info?.profile_avatar && account_obj.account_info.profile_avatar_stat !== 2) {
|
|
201
201
|
debugger;
|
|
202
|
-
set_account_profile_picture(uid, uid, account_obj.account_info, job_id, headers);
|
|
202
|
+
set_account_profile_picture(uid, uid, account_obj.account_info, job_id, headers, account_profile_info);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
// if (account_obj.account_info?.profile_picture) {
|
|
@@ -2091,7 +2091,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2091
2091
|
throw new Error(`account ${contact_uid} not found`);
|
|
2092
2092
|
}
|
|
2093
2093
|
|
|
2094
|
-
set_account_profile_picture(uid, contact_uid, metadata, job_id, headers);
|
|
2094
|
+
set_account_profile_picture(uid, contact_uid, metadata, job_id, headers, account_profile_info);
|
|
2095
2095
|
} else {
|
|
2096
2096
|
// contact without use account
|
|
2097
2097
|
cached_contact = await get_xuda_cache(uid, 'contact', email, 'metadata');
|
|
@@ -2204,7 +2204,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2204
2204
|
save_xuda_cache(uid, 'contact', contact_obj.email, null, contact_obj);
|
|
2205
2205
|
|
|
2206
2206
|
if (!contact_obj.is_spam && contact_obj.name) {
|
|
2207
|
-
|
|
2207
|
+
set_contact_profile_picture(uid, contact_obj._id, { ...metadata, ...contact_obj }, job_id, headers, account_profile_info);
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
2210
|
return save_ret;
|