@xuda.io/account_module 1.2.1759 → 1.2.1761

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 +17 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1140,8 +1140,17 @@ const get_contact_background = function (doc) {
1140
1140
  const get_contact_pattern = async function (doc) {
1141
1141
  let ret = `default-pattern.png`;
1142
1142
  debugger;
1143
+
1144
+ if (doc?.shared_from_uid) {
1145
+ //&& (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1146
+ // pending or active share request
1147
+ const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1148
+ ret = shared_from_uid_ret.data.profile_avatar;
1149
+ } else {
1150
+ }
1151
+
1143
1152
  if (doc.account_type === 'business') {
1144
- if (doc?.account_type_info?.is_real_person && doc?.person_info?.person_full_name !== 'Not available') {
1153
+ if (doc?.is_real_person) {
1145
1154
  ret = doc.profile_picture;
1146
1155
  }
1147
1156
  } else {
@@ -1380,8 +1389,15 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1380
1389
  doc.email = doc.email;
1381
1390
  }
1382
1391
 
1392
+ account_type_info;
1393
+
1394
+ doc.is_real_person = doc.account_type_info.is_real_person && doc?.person_info?.person_full_name !== 'Not available';
1383
1395
  doc.icon_pattern = await get_contact_pattern(doc);
1384
1396
 
1397
+ delete doc.account_type_info;
1398
+ delete doc.person_info;
1399
+ delete doc.business_info;
1400
+
1385
1401
  const contact_chat_conversation_count_ret = await chat_conversation_count();
1386
1402
  const contact_chat_conversation_read_ret = await chat_conversation_read();
1387
1403
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1759",
3
+ "version": "1.2.1761",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {