@xuda.io/account_module 1.2.764 → 1.2.765
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.
- package/index.mjs +2 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1348,6 +1348,7 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
|
|
|
1348
1348
|
|
|
1349
1349
|
//membership_plan
|
|
1350
1350
|
doc.name = `${account_info_ret.data.first_name} ${account_info_ret.data.last_name}`;
|
|
1351
|
+
doc.name = account_info_ret.data?.account_type === 'business' ? account_info_ret.data.business_name : `${account_info_ret.data.first_name} ${account_info_ret.data.last_name}`;
|
|
1351
1352
|
|
|
1352
1353
|
if (account_info_ret.data.phone_number) {
|
|
1353
1354
|
try {
|
|
@@ -1486,7 +1487,7 @@ const get_user_contact = async function (uid, uid_query) {
|
|
|
1486
1487
|
const account_info = (await get_account_name({ uid_query })).data;
|
|
1487
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 };
|
|
1488
1489
|
|
|
1489
|
-
doc.name = account_info?.account_type === 'business' ?
|
|
1490
|
+
doc.name = account_info?.account_type === 'business' ? account_info.business_name : `${account_info.first_name} ${account_info.last_name}`;
|
|
1490
1491
|
doc.profile_avatar = account_info.profile_avatar;
|
|
1491
1492
|
doc.profile_picture = account_info.profile_picture;
|
|
1492
1493
|
doc.card_background = get_contact_background(doc);
|