@xuda.io/account_module 1.2.2135 → 1.2.2137
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
|
@@ -2365,7 +2365,7 @@ export const get_contacts = async function (req, job_id, headers) {
|
|
|
2365
2365
|
return counts_ret?.rows?.[0]?.value || 0;
|
|
2366
2366
|
};
|
|
2367
2367
|
|
|
2368
|
-
const
|
|
2368
|
+
const contact_chat_conversation_count_ret = await chat_conversation_count();
|
|
2369
2369
|
debugger;
|
|
2370
2370
|
for await (let doc of contacts.docs) {
|
|
2371
2371
|
const ret_to = requests_to.docs.find((e) => {
|
|
@@ -2380,6 +2380,10 @@ export const get_contacts = async function (req, job_id, headers) {
|
|
|
2380
2380
|
|
|
2381
2381
|
doc = await get_contact_info(uid, doc);
|
|
2382
2382
|
|
|
2383
|
+
doc.interactions = contact_chat_conversation_count_ret[doc._id];
|
|
2384
|
+
// doc.notifications = contact_chat_conversation_count_ret[doc._id] - contact_chat_conversation_read_ret;
|
|
2385
|
+
doc.chats = doc.interactions;
|
|
2386
|
+
|
|
2383
2387
|
if (filter_type === 'online') {
|
|
2384
2388
|
if (!doc.online) continue;
|
|
2385
2389
|
}
|