@xuda.io/account_module 1.2.752 → 1.2.754

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 -16
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1479,15 +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_account_info = await get_account_name({ uid_query }).data;
1483
- 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 };
1484
- 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;
1485
1485
  my_contact_doc.card_background = get_contact_background(my_contact_doc);
1486
1486
  my_contact_doc.icon_pattern = await get_contact_pattern(my_contact_doc);
1487
1487
  my_contact_doc.border = get_contact_border(my_contact_doc);
1488
- my_contact_doc.auto_respond = my_account_info.auto_respond;
1489
- my_contact_doc.auto_respond_mode = my_account_info.auto_respond_mode;
1490
- 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;
1491
1491
  return my_contact_doc;
1492
1492
  };
1493
1493
 
@@ -1559,16 +1559,7 @@ export const get_contacts = async function (req) {
1559
1559
  requests_from.docs = await get_pending_contact_in(uid);
1560
1560
  shared_from.docs = await get_pending_share_contact_in(uid);
1561
1561
  // my contact
1562
- // const my_contact_ret = await get_account_name({ uid_query: uid }); //await db_module.get_couch_doc_native('xuda_contacts', sender_contact_id);
1563
- // const my_account_info = my_contact_ret.data;
1564
- // 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 };
1565
- // my_contact_doc.profile_avatar = my_account_info.profile_avatar;
1566
- // my_contact_doc.card_background = get_contact_background(my_contact_doc);
1567
- // my_contact_doc.icon_pattern = await get_contact_pattern(my_contact_doc);
1568
- // my_contact_doc.border = get_contact_border(my_contact_doc);
1569
- // my_contact_doc.auto_respond = my_account_info.auto_respond;
1570
- // my_contact_doc.auto_respond_mode = my_account_info.auto_respond_mode;
1571
- // my_contact_doc.auto_respond_agents = my_account_info.auto_respond_agents;
1562
+
1572
1563
  const my_contact_doc = await get_user_contact(uid, uid);
1573
1564
  my_contact.docs = [my_contact_doc];
1574
1565
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.752",
3
+ "version": "1.2.754",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {