@xuda.io/account_module 1.2.855 → 1.2.857

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 +5 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1268,7 +1268,7 @@ const get_contact_pattern = async function (doc) {
1268
1268
  break;
1269
1269
  }
1270
1270
  }
1271
- } else if (doc?.shared_from_uid && (doc.pending || doc.team_req_id)) {
1271
+ } else if (doc?.shared_from_uid && (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1272
1272
  // pending or active share request
1273
1273
  const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1274
1274
  ret = shared_from_uid_ret.data.profile_avatar;
@@ -1402,8 +1402,10 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1402
1402
  try {
1403
1403
  const req_doc = await db_module.get_couch_doc_native('xuda_team', doc.team_req_id);
1404
1404
  doc.connection_stat = req_doc.team_req_stat;
1405
- doc.connection_access_type = req_doc.access_type;
1406
- doc.friend_since = req_doc.team_req_date;
1405
+ doc.connection_type = req_doc.access_type;
1406
+ if (doc.connection_type === 'contact_connection') {
1407
+ doc.friend_since = req_doc.team_req_date;
1408
+ }
1407
1409
  } catch (error) {
1408
1410
  doc.connection_stat = 0;
1409
1411
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.855",
3
+ "version": "1.2.857",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {