@xuda.io/account_module 1.2.471 → 1.2.473
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1385,9 +1385,9 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1385
1385
|
if (contact_ret.rows.length) {
|
|
1386
1386
|
throw new Error('contact already exist active or deleted');
|
|
1387
1387
|
}
|
|
1388
|
-
|
|
1388
|
+
let account_ret;
|
|
1389
1389
|
if (contact_uid) {
|
|
1390
|
-
|
|
1390
|
+
account_ret = await get_account_name({ uid_query: contact_uid });
|
|
1391
1391
|
if (account_ret.code < 0) {
|
|
1392
1392
|
throw new Error(`account ${contact_uid} not found`);
|
|
1393
1393
|
}
|
|
@@ -1410,7 +1410,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1410
1410
|
};
|
|
1411
1411
|
const ret = await db_module.save_couch_doc('xuda_contacts', doc);
|
|
1412
1412
|
|
|
1413
|
-
if (!account_ret
|
|
1413
|
+
if (!account_ret?.data?.profile_avatar) {
|
|
1414
1414
|
const app_id = await get_account_default_project_id(uid);
|
|
1415
1415
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1416
1416
|
ai_module.update_thumbnail('contact', doc, app_id, uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact', app_id]);
|