@xuda.io/account_module 1.2.1399 → 1.2.1401
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 +6 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2066,6 +2066,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2066
2066
|
};
|
|
2067
2067
|
|
|
2068
2068
|
const set_account_profile_picture = async function (uid, contact_uid) {
|
|
2069
|
+
await update_profile_avatar_status(contact_uid, 1);
|
|
2069
2070
|
try {
|
|
2070
2071
|
let profile_picture;
|
|
2071
2072
|
|
|
@@ -2075,6 +2076,7 @@ const set_account_profile_picture = async function (uid, contact_uid) {
|
|
|
2075
2076
|
if (account_code < 0) {
|
|
2076
2077
|
throw new Error(`account ${contact_uid} not found`);
|
|
2077
2078
|
}
|
|
2079
|
+
await update_profile_avatar_status(contact_uid, 2);
|
|
2078
2080
|
if (!account_info.profile_picture) {
|
|
2079
2081
|
const file_ret = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info }, account_profile_info, job_id, headers);
|
|
2080
2082
|
|
|
@@ -2135,8 +2137,11 @@ const set_account_profile_picture = async function (uid, contact_uid) {
|
|
|
2135
2137
|
account_info.profile_avatar = account_info.profile_avatar_obj.file_url;
|
|
2136
2138
|
|
|
2137
2139
|
const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
2140
|
+
await update_profile_avatar_status(contact_uid, 3);
|
|
2138
2141
|
}
|
|
2139
|
-
} catch (error) {
|
|
2142
|
+
} catch (error) {
|
|
2143
|
+
await update_profile_avatar_status(contact_uid, 3);
|
|
2144
|
+
}
|
|
2140
2145
|
};
|
|
2141
2146
|
|
|
2142
2147
|
export const get_contacts = async function (req) {
|