@xuda.io/account_module 1.2.753 → 1.2.755
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 +11 -9
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1480,15 +1480,17 @@ export const get_pending_share_contact_in = async function (uid, _id) {
|
|
|
1480
1480
|
|
|
1481
1481
|
const get_user_contact = async function (uid, uid_query) {
|
|
1482
1482
|
const account_info = await get_account_name({ uid_query }).data;
|
|
1483
|
-
let
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1483
|
+
let doc = { docType: 'contact', date_created: Date.now(), email: [account_info.email], my_contact: uid === uid_query, contact_uid: uid_query };
|
|
1484
|
+
|
|
1485
|
+
doc.name = account_info?.account_type === 'business' ? doc.business_name : `${account_info.first_name} ${account_info.last_name}`;
|
|
1486
|
+
doc.profile_avatar = account_info.profile_avatar;
|
|
1487
|
+
doc.card_background = get_contact_background(doc);
|
|
1488
|
+
doc.icon_pattern = await get_contact_pattern(doc);
|
|
1489
|
+
doc.border = get_contact_border(doc);
|
|
1490
|
+
doc.auto_respond = account_info.auto_respond;
|
|
1491
|
+
doc.auto_respond_mode = account_info.auto_respond_mode;
|
|
1492
|
+
doc.auto_respond_agents = account_info.auto_respond_agents;
|
|
1493
|
+
return doc;
|
|
1492
1494
|
};
|
|
1493
1495
|
|
|
1494
1496
|
export const get_contacts = async function (req) {
|