@xuda.io/account_module 1.2.887 → 1.2.889
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 +5 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1649,21 +1649,24 @@ export const get_contacts = async function (req) {
|
|
|
1649
1649
|
doc = await get_contact_info(uid, doc);
|
|
1650
1650
|
contact_docs.docs.push(doc);
|
|
1651
1651
|
}
|
|
1652
|
-
requests_from.total_docs = requests_from.docs.length;
|
|
1653
1652
|
|
|
1654
1653
|
if (!contact_id && with_requests) {
|
|
1655
1654
|
if (filter_type === 'pending') {
|
|
1656
1655
|
////// TO - OUT
|
|
1657
1656
|
requests_to.docs = await get_pending_contact_out(uid);
|
|
1657
|
+
requests_to.total_docs = requests_to.docs.length;
|
|
1658
1658
|
|
|
1659
1659
|
////// FROM - IN
|
|
1660
1660
|
requests_from.docs = await get_pending_contact_in(uid);
|
|
1661
|
+
requests_from.total_docs = requests_from.docs.length;
|
|
1661
1662
|
shared_from.docs = await get_pending_share_contact_in(uid);
|
|
1663
|
+
shared_from.total_docs = shared_from.docs.length;
|
|
1662
1664
|
}
|
|
1663
1665
|
// my contact
|
|
1664
1666
|
if (filter_type === 'all' && !search && contact_docs.docs.length) {
|
|
1665
1667
|
const my_contact_doc = await get_user_contact(uid, uid);
|
|
1666
1668
|
my_contact.docs = [my_contact_doc];
|
|
1669
|
+
my_contact.total_docs = 1;
|
|
1667
1670
|
}
|
|
1668
1671
|
}
|
|
1669
1672
|
|
|
@@ -1671,6 +1674,7 @@ export const get_contacts = async function (req) {
|
|
|
1671
1674
|
code: 1,
|
|
1672
1675
|
data: {
|
|
1673
1676
|
docs: [...my_contact.docs, ...shared_from.docs, ...requests_from.docs, ...requests_to.docs, ...contact_docs.docs],
|
|
1677
|
+
total_docs: ai_chats.total_docs + requests_from.total_docs,
|
|
1674
1678
|
},
|
|
1675
1679
|
};
|
|
1676
1680
|
};
|