@xuda.io/account_module 1.2.1684 → 1.2.1685
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1305,7 +1305,7 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
|
|
|
1305
1305
|
|
|
1306
1306
|
return counts_ret?.rows?.[0]?.value || 0;
|
|
1307
1307
|
};
|
|
1308
|
-
|
|
1308
|
+
|
|
1309
1309
|
doc.notifications = 0;
|
|
1310
1310
|
if (doc.contact_uid) {
|
|
1311
1311
|
const account_info_ret = await get_account_name({ uid_query: doc.contact_uid });
|
|
@@ -1373,8 +1373,11 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
|
|
|
1373
1373
|
doc.email = doc.email;
|
|
1374
1374
|
}
|
|
1375
1375
|
|
|
1376
|
+
const contact_chat_conversation_count_ret = await chat_conversation_count();
|
|
1377
|
+
const contact_chat_conversation_read_ret = await chat_conversation_read();
|
|
1378
|
+
|
|
1376
1379
|
doc.interactions = contact_chat_conversation_count_ret;
|
|
1377
|
-
doc.notifications = contact_chat_conversation_count_ret;
|
|
1380
|
+
doc.notifications = contact_chat_conversation_count_ret - contact_chat_conversation_read_ret;
|
|
1378
1381
|
doc.chats = doc.interactions;
|
|
1379
1382
|
|
|
1380
1383
|
// const chats_ret = await ai_module.get_ai_chats({ uid, reference_id: doc._id });
|