@xuda.io/account_module 1.2.347 → 1.2.349
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 +8 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1187,7 +1187,7 @@ export const get_contacts = async function (req) {
|
|
|
1187
1187
|
fields: ['_id', 'team_req_date', 'team_req_to_email', 'sender_account_info.email', 'sender_account_info.first_name', 'sender_account_info.last_name', 'sender_account_info.profile_avatar', 'team_req_from_uid'],
|
|
1188
1188
|
});
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
|
|
1191
1191
|
return {
|
|
1192
1192
|
code: 1,
|
|
1193
1193
|
data: {
|
|
@@ -1577,23 +1577,30 @@ export const update_contacts_with_account_changes = async function (uid, changes
|
|
|
1577
1577
|
selector: { contact_uid: uid, docType: 'contact' },
|
|
1578
1578
|
};
|
|
1579
1579
|
debugger;
|
|
1580
|
+
let changes_made;
|
|
1580
1581
|
var contacts = await db_module.find_couch_query('xuda_contacts', opt);
|
|
1581
1582
|
for (let doc of contacts.docs) {
|
|
1582
1583
|
if (changes.includes('profile_picture')) {
|
|
1584
|
+
changes_made = true;
|
|
1583
1585
|
doc.profile_picture = account_obj.account_info.profile_picture;
|
|
1584
1586
|
}
|
|
1585
1587
|
if (changes.includes('profile_avatar')) {
|
|
1588
|
+
changes_made = true;
|
|
1586
1589
|
doc.profile_avatar = account_obj.account_info.profile_avatar;
|
|
1587
1590
|
}
|
|
1588
1591
|
if (changes.includes('email')) {
|
|
1592
|
+
changes_made = true;
|
|
1589
1593
|
doc.email = account_obj.account_info.email;
|
|
1590
1594
|
}
|
|
1591
1595
|
if (changes.includes('first_name') || changes.includes('last_name')) {
|
|
1596
|
+
changes_made = true;
|
|
1592
1597
|
doc.name = `${account_obj.account_info.first_name} ${account_obj.account_info.last_name}`;
|
|
1593
1598
|
}
|
|
1594
1599
|
|
|
1595
1600
|
console.log(doc);
|
|
1596
1601
|
}
|
|
1602
|
+
if (contacts.docs && changes_made) {
|
|
1603
|
+
}
|
|
1597
1604
|
|
|
1598
1605
|
return username;
|
|
1599
1606
|
} catch (err) {
|