@xuda.io/account_module 1.2.1385 → 1.2.1386
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 +8 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -195,7 +195,7 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
195
195
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
196
196
|
if (account_obj.account_info?.profile_picture) {
|
|
197
197
|
if (!account_obj.account_info?.profile_avatar) {
|
|
198
|
-
ai_module.
|
|
198
|
+
ai_module.get_profile_avatar({ url: account_obj.account_info?.profile_picture, uid, account_obj, account_profile_info }, job_id, headers);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
201
201
|
ai_module.update_thumbnail('account', account_obj, account_obj.account_project_id, uid, job_id, headers, 'xuda_accounts');
|
|
@@ -1771,7 +1771,7 @@ export const get_user_card = async function (uid, uid_query) {
|
|
|
1771
1771
|
// try {
|
|
1772
1772
|
// const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1773
1773
|
|
|
1774
|
-
// ai_module.
|
|
1774
|
+
// ai_module.get_profile_avatar({ url: account_info?.profile_picture, uid, account_obj }, job_id, headers);
|
|
1775
1775
|
|
|
1776
1776
|
// // const account_info = await get_account_name({ uid });
|
|
1777
1777
|
// // let username = 'unknown';
|
|
@@ -1991,11 +1991,13 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
if (!account_info.profile_picture) {
|
|
1993
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.
|
|
1994
|
+
account_info.profile_picture = account_info.profile_picture_obj.file_url;
|
|
1995
1995
|
// account_info.profile_picture_obj = profile_picture_obj;
|
|
1996
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
|
+
|
|
2000
|
+
const { bio, business_name, country, mainCategory, subCategory } = account_info;
|
|
1999
2001
|
} else {
|
|
2000
2002
|
// contact without use account
|
|
2001
2003
|
|
|
@@ -2035,6 +2037,8 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2035
2037
|
team_req_id,
|
|
2036
2038
|
metadata,
|
|
2037
2039
|
is_spam,
|
|
2040
|
+
profile_picture,
|
|
2041
|
+
profile_picture_obj,
|
|
2038
2042
|
profile_avatar,
|
|
2039
2043
|
profile_avatar_obj,
|
|
2040
2044
|
account_profiles: [account_profile_obj._id],
|
|
@@ -2045,7 +2049,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2045
2049
|
if (!account_info.profile_avatar) {
|
|
2046
2050
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
2047
2051
|
if (account_info_ret?.data?.profile_picture) {
|
|
2048
|
-
ai_module.
|
|
2052
|
+
ai_module.get_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);
|
|
2049
2053
|
} else {
|
|
2050
2054
|
if (!doc.profile_avatar) {
|
|
2051
2055
|
// create factual avatar
|