@xuda.io/account_module 1.2.751 → 1.2.753

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.
Files changed (2) hide show
  1. package/index.mjs +7 -17
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1479,16 +1479,15 @@ export const get_pending_share_contact_in = async function (uid, _id) {
1479
1479
  };
1480
1480
 
1481
1481
  const get_user_contact = async function (uid, uid_query) {
1482
- const my_contact_ret = await get_account_name({ uid_query });
1483
- const my_account_info = my_contact_ret.data;
1484
- let my_contact_doc = { docType: 'contact', date_created: Date.now(), email: [my_account_info.email], name: `${my_account_info.first_name} ${my_account_info.last_name}`, my_contact: uid === uid_query, contact_uid: uid_query };
1485
- my_contact_doc.profile_avatar = my_account_info.profile_avatar;
1482
+ const account_info = await get_account_name({ uid_query }).data;
1483
+ let my_contact_doc = { docType: 'contact', date_created: Date.now(), email: [account_info.email], name: `${account_info.first_name} ${account_info.last_name}`, my_contact: uid === uid_query, contact_uid: uid_query };
1484
+ my_contact_doc.profile_avatar = account_info.profile_avatar;
1486
1485
  my_contact_doc.card_background = get_contact_background(my_contact_doc);
1487
1486
  my_contact_doc.icon_pattern = await get_contact_pattern(my_contact_doc);
1488
1487
  my_contact_doc.border = get_contact_border(my_contact_doc);
1489
- my_contact_doc.auto_respond = my_account_info.auto_respond;
1490
- my_contact_doc.auto_respond_mode = my_account_info.auto_respond_mode;
1491
- my_contact_doc.auto_respond_agents = my_account_info.auto_respond_agents;
1488
+ my_contact_doc.auto_respond = account_info.auto_respond;
1489
+ my_contact_doc.auto_respond_mode = account_info.auto_respond_mode;
1490
+ my_contact_doc.auto_respond_agents = account_info.auto_respond_agents;
1492
1491
  return my_contact_doc;
1493
1492
  };
1494
1493
 
@@ -1560,16 +1559,7 @@ export const get_contacts = async function (req) {
1560
1559
  requests_from.docs = await get_pending_contact_in(uid);
1561
1560
  shared_from.docs = await get_pending_share_contact_in(uid);
1562
1561
  // my contact
1563
- // const my_contact_ret = await get_account_name({ uid_query: uid }); //await db_module.get_couch_doc_native('xuda_contacts', sender_contact_id);
1564
- // const my_account_info = my_contact_ret.data;
1565
- // let my_contact_doc = { docType: 'contact', date_created: Date.now(), email: [my_account_info.email], name: `${my_account_info.first_name} ${my_account_info.last_name}`, my_contact: true, contact_uid: uid };
1566
- // my_contact_doc.profile_avatar = my_account_info.profile_avatar;
1567
- // my_contact_doc.card_background = get_contact_background(my_contact_doc);
1568
- // my_contact_doc.icon_pattern = await get_contact_pattern(my_contact_doc);
1569
- // my_contact_doc.border = get_contact_border(my_contact_doc);
1570
- // my_contact_doc.auto_respond = my_account_info.auto_respond;
1571
- // my_contact_doc.auto_respond_mode = my_account_info.auto_respond_mode;
1572
- // my_contact_doc.auto_respond_agents = my_account_info.auto_respond_agents;
1562
+
1573
1563
  const my_contact_doc = await get_user_contact(uid, uid);
1574
1564
  my_contact.docs = [my_contact_doc];
1575
1565
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.751",
3
+ "version": "1.2.753",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {