@xuda.io/account_module 1.2.1047 → 1.2.1049

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 +3 -9
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1665,7 +1665,7 @@ export const get_contacts = async function (req) {
1665
1665
  let requests_to = { docs: [], total_docs: 0 };
1666
1666
  let requests_from = { docs: [], total_docs: 0 };
1667
1667
  let shared_from = { docs: [], total_docs: 0 };
1668
- let my_contact = { docs: [], total_docs: 0 };
1668
+
1669
1669
  let contact_docs = { docs: [], total_docs: contacts.total_docs };
1670
1670
  for await (let doc of contacts.docs) {
1671
1671
  const ret_to = requests_to.docs.find((e) => {
@@ -1699,19 +1699,13 @@ export const get_contacts = async function (req) {
1699
1699
  shared_from.docs = await get_pending_share_contact_in(uid);
1700
1700
  shared_from.total_docs = shared_from.docs.length;
1701
1701
  }
1702
- // my contact
1703
- if (filter_type === 'all' && !search && contact_docs.docs.length) {
1704
- const my_contact_doc = await get_user_contact(uid, uid);
1705
- my_contact.docs = [my_contact_doc];
1706
- my_contact.total_docs = 1;
1707
- }
1708
1702
  }
1709
1703
 
1710
1704
  return {
1711
1705
  code: 1,
1712
1706
  data: {
1713
- docs: [...my_contact.docs, ...shared_from.docs, ...requests_from.docs, ...requests_to.docs, ...contact_docs.docs],
1714
- total_docs: my_contact.total_docs + shared_from.total_docs + requests_from.total_docs + requests_to.total_docs + contact_docs.total_docs,
1707
+ docs: [...shared_from.docs, ...requests_from.docs, ...requests_to.docs, ...contact_docs.docs],
1708
+ total_docs: shared_from.total_docs + requests_from.total_docs + requests_to.total_docs + contact_docs.total_docs,
1715
1709
  },
1716
1710
  };
1717
1711
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1047",
3
+ "version": "1.2.1049",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {