@xuda.io/account_module 1.2.755 → 1.2.757

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