@xuda.io/account_module 1.2.1036 → 1.2.1038
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 -11
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2573,25 +2573,19 @@ export const get_profiles = async function (req) {
|
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
2575
|
|
|
2576
|
-
let requests_from = { docs: [], total_docs: 0 };
|
|
2577
2576
|
let shared_from = { docs: [], total_docs: 0 };
|
|
2578
|
-
|
|
2579
|
-
let
|
|
2577
|
+
|
|
2578
|
+
let profile_docs = { docs: [], total_docs: profiles.total_docs };
|
|
2580
2579
|
for await (let doc of profiles.docs) {
|
|
2581
2580
|
if (ret_to) continue;
|
|
2582
2581
|
|
|
2583
|
-
const ret_from = requests_from.docs.find((e) => {
|
|
2584
|
-
return e.contact_uid === doc.contact_uid;
|
|
2585
|
-
});
|
|
2586
|
-
if (ret_from) continue;
|
|
2587
|
-
|
|
2588
2582
|
doc = await get_contact_info(uid, doc);
|
|
2589
2583
|
|
|
2590
2584
|
if (filter_type === 'online') {
|
|
2591
2585
|
if (!doc.online) continue;
|
|
2592
2586
|
}
|
|
2593
2587
|
|
|
2594
|
-
|
|
2588
|
+
profile_docs.docs.push(doc);
|
|
2595
2589
|
}
|
|
2596
2590
|
|
|
2597
2591
|
if (!profile_id) {
|
|
@@ -2605,8 +2599,8 @@ export const get_profiles = async function (req) {
|
|
|
2605
2599
|
return {
|
|
2606
2600
|
code: 1,
|
|
2607
2601
|
data: {
|
|
2608
|
-
docs: [...
|
|
2609
|
-
total_docs:
|
|
2602
|
+
docs: [...shared_from.docs, ...profile_docs.docs],
|
|
2603
|
+
total_docs: shared_from.total_docs + profile_docs.total_docs,
|
|
2610
2604
|
},
|
|
2611
2605
|
};
|
|
2612
2606
|
};
|