@xuda.io/account_module 1.2.1684 → 1.2.1686
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 +6 -3
- 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 });
|
|
@@ -2654,7 +2657,7 @@ export const get_account_profile_info = async function (uid, contact_profile_doc
|
|
|
2654
2657
|
|
|
2655
2658
|
const get_pattern = async function (doc) {
|
|
2656
2659
|
let ret = `default-pattern.png`;
|
|
2657
|
-
|
|
2660
|
+
debugger;
|
|
2658
2661
|
if (doc.shared_from_uid) {
|
|
2659
2662
|
// const account_profile_doc = await db_module.get_couch_doc_native('xuda_accounts', doc.share_item_id);
|
|
2660
2663
|
const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
|