@xuda.io/account_module 1.2.1683 → 1.2.1684

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 +13 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1292,6 +1292,19 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1292
1292
 
1293
1293
  return counts_ret?.rows?.[0]?.value || 0;
1294
1294
  };
1295
+ const chat_conversation_read = async function () {
1296
+ const account_profile_info = await get_active_account_profile_info(uid);
1297
+
1298
+ const counts_ret = await db_module.get_app_couch_view(account_profile_info.app_id, 'chat_conversation_item_read', {
1299
+ reduce: true,
1300
+ group_level: 2,
1301
+
1302
+ startkey: [uid, doc._id, ''],
1303
+ endkey: [uid, doc._id, 'zzzzzz'],
1304
+ });
1305
+
1306
+ return counts_ret?.rows?.[0]?.value || 0;
1307
+ };
1295
1308
  const contact_chat_conversation_count_ret = await chat_conversation_count();
1296
1309
  doc.notifications = 0;
1297
1310
  if (doc.contact_uid) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1683",
3
+ "version": "1.2.1684",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {