@xuda.io/account_module 1.2.510 → 1.2.511

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 -35
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1291,7 +1291,9 @@ export const get_contact_info = async function (contact_doc, _id) {
1291
1291
  doc.icon_pattern = get_contact_pattern(doc);
1292
1292
  }
1293
1293
 
1294
- const chats_ret = await get_ai_chats({ uid, reference_id: doc._id });
1294
+ const chats_ret = await ai_module.get_ai_chats({ uid, reference_id: doc._id });
1295
+ for await (let doc of chats_ret.data.docs) {
1296
+ }
1295
1297
 
1296
1298
  doc.border = get_contact_border(doc);
1297
1299
  if (!doc.name) {
@@ -1360,40 +1362,6 @@ export const get_contacts = async function (req) {
1360
1362
  const contacts = await db_module.find_couch_query('xuda_contacts', opt);
1361
1363
 
1362
1364
  for await (let doc of contacts.docs) {
1363
- // if (doc.contact_uid) {
1364
- // const account_info_ret = await get_account_name({ uid_query: doc.contact_uid });
1365
- // if (account_info_ret.code < 0) {
1366
- // continue; // throw new Error(`account ${contact_uid} not found`);
1367
- // }
1368
-
1369
- // doc.profile_avatar = account_info_ret.data.profile_avatar;
1370
-
1371
- // doc.card_background = get_contact_background(doc);
1372
-
1373
- // //membership_plan
1374
- // doc.name = `${account_info_ret.data.first_name} ${account_info_ret.data.last_name}`;
1375
-
1376
- // doc.telephone = account_info_ret.data.phone;
1377
-
1378
- // // doc.notifications = 45;
1379
- // // doc.online = true;
1380
- // if (doc.team_req_id) {
1381
- // try {
1382
- // const req_doc = await db_module.get_couch_doc_native('xuda_team', doc.team_req_id);
1383
- // doc.connection_stat = req_doc.team_req_stat;
1384
- // } catch (error) {
1385
- // doc.connection_stat = 0;
1386
- // }
1387
- // }
1388
-
1389
- // doc.icon_pattern = get_contact_pattern(doc);
1390
- // }
1391
- // doc.border = get_contact_border(doc);
1392
- // if (!doc.name) {
1393
- // doc.name = doc.email;
1394
- // }
1395
-
1396
- // doc.email = '';
1397
1365
  doc = await get_contact_info(doc);
1398
1366
  }
1399
1367
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.510",
3
+ "version": "1.2.511",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {