@xuda.io/account_module 1.2.1726 → 1.2.1728
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 +5 -5
- 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) {
|
|
@@ -1941,9 +1941,9 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
1941
1941
|
}
|
|
1942
1942
|
};
|
|
1943
1943
|
|
|
1944
|
-
const set_account_profile_picture = async function (uid, account_uid, metadata, job_id, headers) {
|
|
1944
|
+
const set_account_profile_picture = async function (uid, account_uid, metadata, job_id, headers, account_profile_info) {
|
|
1945
1945
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1946
|
-
const account_profile_info = await get_active_account_profile_info(uid);
|
|
1946
|
+
// const account_profile_info = await get_active_account_profile_info(uid);
|
|
1947
1947
|
await update_account_profile_picture_status(account_uid, 1);
|
|
1948
1948
|
try {
|
|
1949
1949
|
let 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');
|