@xuda.io/account_module 1.2.1672 → 1.2.1674
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 +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1289,11 +1289,10 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
|
|
|
1289
1289
|
startkey: [doc._id, ''],
|
|
1290
1290
|
endkey: [doc._id, 'zzzzzz'],
|
|
1291
1291
|
});
|
|
1292
|
-
|
|
1292
|
+
|
|
1293
1293
|
return counts_ret?.rows?.[0]?.value || [0, 0];
|
|
1294
|
-
debugger;
|
|
1295
1294
|
};
|
|
1296
|
-
await chat_conversation_count();
|
|
1295
|
+
const contact_chat_conversation_count_ret = await chat_conversation_count();
|
|
1297
1296
|
doc.notifications = 0;
|
|
1298
1297
|
if (doc.contact_uid) {
|
|
1299
1298
|
const account_info_ret = await get_account_name({ uid_query: doc.contact_uid });
|
|
@@ -1361,7 +1360,8 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
|
|
|
1361
1360
|
doc.email = doc.email;
|
|
1362
1361
|
}
|
|
1363
1362
|
|
|
1364
|
-
doc.interactions = 0;
|
|
1363
|
+
doc.interactions = contact_chat_conversation_count_ret[0];
|
|
1364
|
+
doc.notifications = contact_chat_conversation_count_ret[0] - contact_chat_conversation_count_ret[1];
|
|
1365
1365
|
doc.chats = 0;
|
|
1366
1366
|
|
|
1367
1367
|
// const chats_ret = await ai_module.get_ai_chats({ uid, reference_id: doc._id });
|