@xuda.io/account_module 1.2.808 → 1.2.809
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 +5 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1657,12 +1657,17 @@ export const delete_contact = async function (req) {
|
|
|
1657
1657
|
const { contact_id } = req;
|
|
1658
1658
|
try {
|
|
1659
1659
|
var contact_doc = await db_module.get_couch_doc_native('xuda_contacts', contact_id);
|
|
1660
|
+
|
|
1661
|
+
// validate share
|
|
1662
|
+
|
|
1660
1663
|
contact_doc.stat = 4;
|
|
1661
1664
|
contact_doc.stat_ts = Date.now();
|
|
1662
1665
|
contact_doc.stat_reason = 'deleted by the user';
|
|
1663
1666
|
|
|
1664
1667
|
const contact_save_ret = await db_module.save_couch_doc('xuda_contacts', contact_doc);
|
|
1665
1668
|
|
|
1669
|
+
// delete chats
|
|
1670
|
+
|
|
1666
1671
|
return contact_save_ret;
|
|
1667
1672
|
} catch (err) {
|
|
1668
1673
|
return {
|