@xuda.io/account_module 1.2.1067 → 1.2.1069
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 +4 -27
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1227,8 +1227,6 @@ const get_contact_background = function (doc) {
|
|
|
1227
1227
|
|
|
1228
1228
|
if (doc.pending) {
|
|
1229
1229
|
ret = `linear-gradient(145deg, #009ec2 0%, #002c74 100%)`;
|
|
1230
|
-
} else if (doc.my_contact) {
|
|
1231
|
-
ret = `linear-gradient(145deg, #242480 0%, #060619 100%)`;
|
|
1232
1230
|
} else {
|
|
1233
1231
|
switch (doc.contact_mood_level) {
|
|
1234
1232
|
case -2: {
|
|
@@ -1553,7 +1551,7 @@ export const get_pending_share_contact_in = async function (uid, _id) {
|
|
|
1553
1551
|
|
|
1554
1552
|
const get_user_contact = async function (uid, uid_query) {
|
|
1555
1553
|
const account_info = (await get_account_name({ uid_query })).data;
|
|
1556
|
-
let doc = { docType: 'contact', account_type: account_info.account_type, date_created: Date.now(), email: account_info.email,
|
|
1554
|
+
let doc = { docType: 'contact', account_type: account_info.account_type, date_created: Date.now(), email: account_info.email, contact_uid: uid_query, username: account_info.username };
|
|
1557
1555
|
|
|
1558
1556
|
doc.name = account_info?.account_type === 'business' ? account_info.business_name : `${account_info.first_name} ${account_info.last_name}`;
|
|
1559
1557
|
doc.profile_avatar = account_info.profile_avatar;
|
|
@@ -2561,36 +2559,15 @@ export const get_account_profile_info = async function (uid, contact_profile_doc
|
|
|
2561
2559
|
};
|
|
2562
2560
|
|
|
2563
2561
|
doc.avatar_source = account_info_ret.data.avatar_source;
|
|
2564
|
-
doc.icon_pattern = await
|
|
2565
|
-
doc.username = account_info_ret.data.username;
|
|
2566
|
-
doc.business_name = account_info_ret.data.business_name;
|
|
2567
|
-
doc.address = account_info_ret.data.address;
|
|
2568
|
-
doc.city = account_info_ret.data.city;
|
|
2569
|
-
doc.state = account_info_ret.data.state;
|
|
2570
|
-
doc.zip = account_info_ret.data.zip;
|
|
2571
|
-
doc.account_type = account_info_ret.data.account_type;
|
|
2572
|
-
doc.email = doc.email?.[0];
|
|
2573
|
-
if (doc.connection_stat === 3) {
|
|
2574
|
-
doc.online = account_info_ret.data.online;
|
|
2575
|
-
}
|
|
2562
|
+
doc.icon_pattern = await get_pattern(doc);
|
|
2576
2563
|
|
|
2577
2564
|
doc.interactions = 0;
|
|
2578
2565
|
doc.chats = 0;
|
|
2579
2566
|
|
|
2580
2567
|
const chats_ret = await ai_module.get_ai_chats({ uid, reference_id: doc._id });
|
|
2581
|
-
for (let chat_doc of chats_ret.data.docs) {
|
|
2582
|
-
doc.notifications += chat_doc.notifications;
|
|
2583
2568
|
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
doc.interactions += chat_doc.interactions;
|
|
2587
|
-
}
|
|
2588
|
-
doc.contact_mood_level = chat_doc.mood_level || 0;
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
doc.card_background = get_contact_background(doc);
|
|
2592
|
-
|
|
2593
|
-
doc.border = get_contact_border(doc);
|
|
2569
|
+
doc.card_background = `linear-gradient(145deg, #242480 0%, #060619 100%)`;
|
|
2570
|
+
// doc.border = get_contact_border(doc);
|
|
2594
2571
|
|
|
2595
2572
|
return doc;
|
|
2596
2573
|
};
|