@xuda.io/account_module 1.2.1290 → 1.2.1292
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 +18 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1589,6 +1589,24 @@ export const update_contact = async function (req) {
|
|
|
1589
1589
|
} else if (contact_uid) {
|
|
1590
1590
|
contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [account_profile_info.uid, contact_uid] });
|
|
1591
1591
|
}
|
|
1592
|
+
|
|
1593
|
+
let opt = {
|
|
1594
|
+
selector: {
|
|
1595
|
+
docType: 'contact',
|
|
1596
|
+
stat: 3,
|
|
1597
|
+
},
|
|
1598
|
+
limit: 1,
|
|
1599
|
+
fields: ['_id'],
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1602
|
+
if (email) {
|
|
1603
|
+
opt.selector.email = email;
|
|
1604
|
+
} else if (contact_uid) {
|
|
1605
|
+
opt.selector.contact_uid = contact_uid;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
contact_ret = await find_contact_query(account_profile_info.uid, opt);
|
|
1609
|
+
|
|
1592
1610
|
if (contact_ret.rows.length) {
|
|
1593
1611
|
var doc = contact_ret.rows[0].value;
|
|
1594
1612
|
if (stat) {
|