@xuda.io/account_module 1.2.1383 → 1.2.1385
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
|
@@ -1990,10 +1990,10 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1990
1990
|
throw new Error(`account ${contact_uid} not found`);
|
|
1991
1991
|
}
|
|
1992
1992
|
if (!account_info.profile_picture) {
|
|
1993
|
-
profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info }, account_profile_info, job_id, headers);
|
|
1994
|
-
profile_picture = profile_picture_obj.url;
|
|
1995
|
-
account_info.profile_picture_obj = profile_picture_obj;
|
|
1996
|
-
account_info.profile_picture = profile_picture;
|
|
1993
|
+
account_info.profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info }, account_profile_info, job_id, headers);
|
|
1994
|
+
account_info.profile_picture = account_info.profile_picture_obj.url;
|
|
1995
|
+
// account_info.profile_picture_obj = profile_picture_obj;
|
|
1996
|
+
// account_info.profile_picture = profile_picture;
|
|
1997
1997
|
const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
1998
1998
|
}
|
|
1999
1999
|
} else {
|
|
@@ -2042,7 +2042,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2042
2042
|
};
|
|
2043
2043
|
const save_ret = await save_contact(uid, doc);
|
|
2044
2044
|
|
|
2045
|
-
if (!
|
|
2045
|
+
if (!account_info.profile_avatar) {
|
|
2046
2046
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
2047
2047
|
if (account_info_ret?.data?.profile_picture) {
|
|
2048
2048
|
ai_module.create_profile_avatar({ url: account_obj.profile_picture, uid, account_obj: { _id: contact_uid, account_info: account_info_ret.data }, account_profile_info }, job_id, headers);
|