@xuda.io/account_module 1.2.517 → 1.2.519

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.
Files changed (2) hide show
  1. package/index.mjs +3 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1278,7 +1278,7 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1278
1278
 
1279
1279
  doc.telephone = account_info_ret.data.phone;
1280
1280
 
1281
- // doc.online = true;
1281
+ doc.online = true;
1282
1282
  if (doc.team_req_id) {
1283
1283
  try {
1284
1284
  const req_doc = await db_module.get_couch_doc_native('xuda_team', doc.team_req_id);
@@ -1292,10 +1292,8 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1292
1292
  }
1293
1293
 
1294
1294
  const chats_ret = await ai_module.get_ai_chats({ uid, reference_id: doc._id });
1295
- for (let doc of chats_ret.data.docs) {
1296
- for (let msg of doc.messages) {
1297
- if (!msg.read) doc.notifications++;
1298
- }
1295
+ for (let chat_doc of chats_ret.data.docs) {
1296
+ doc.notifications += chat_doc.notifications;
1299
1297
  }
1300
1298
 
1301
1299
  doc.border = get_contact_border(doc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.517",
3
+ "version": "1.2.519",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {