@xuda.io/account_module 1.2.757 → 1.2.759

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
@@ -1248,12 +1248,14 @@ const get_contact_pattern = async function (doc) {
1248
1248
 
1249
1249
  if (doc.my_contact) {
1250
1250
  if (doc.account_type === 'business') {
1251
+ // const shared_from_uid_ret = await get_account_name({ uid_query: doc.contact_uid });
1252
+ ret = doc.profile_picture;
1251
1253
  } else {
1252
1254
  ret = `my-pattern.png`;
1253
1255
  }
1254
1256
  } else if (doc.shared_from_uid) {
1255
1257
  const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1256
- ret = shared_from_uid_ret.data.profile_picture;
1258
+ ret = shared_from_uid_ret.data.profile_avatar;
1257
1259
  } else if (doc.contact_uid) {
1258
1260
  ret = `xu-pattern.png`;
1259
1261
  } else {
@@ -1482,8 +1484,8 @@ export const get_pending_share_contact_in = async function (uid, _id) {
1482
1484
  };
1483
1485
 
1484
1486
  const get_user_contact = async function (uid, uid_query) {
1485
- const account_info = await get_account_name({ uid_query }).data;
1486
- let doc = { docType: 'contact', account_type: account_info.account_type, date_created: Date.now(), email: [account_info.email], my_contact: uid === uid_query, contact_uid: uid_query };
1487
+ const account_info = (await get_account_name({ uid_query })).data;
1488
+ let doc = { docType: 'contact', account_type: account_info.account_type, date_created: Date.now(), email: account_info.email, my_contact: uid === uid_query, contact_uid: uid_query };
1487
1489
 
1488
1490
  doc.name = account_info?.account_type === 'business' ? doc.business_name : `${account_info.first_name} ${account_info.last_name}`;
1489
1491
  doc.profile_avatar = account_info.profile_avatar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.757",
3
+ "version": "1.2.759",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {