@xuda.io/account_module 1.2.1113 → 1.2.1115
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 +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1743,7 +1743,7 @@ export const delete_contact = async function (req, job_id, headers) {
|
|
|
1743
1743
|
contact_doc.stat_reason = 'deleted by the user';
|
|
1744
1744
|
|
|
1745
1745
|
const contact_save_ret = await db_module.save_couch_doc('xuda_contacts', contact_doc);
|
|
1746
|
-
|
|
1746
|
+
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1747
1747
|
ai_module.delete_depended_chats(uid, contact_id);
|
|
1748
1748
|
return contact_save_ret;
|
|
1749
1749
|
} catch (err) {
|
|
@@ -2694,6 +2694,7 @@ export const get_account_profiles = async function (req) {
|
|
|
2694
2694
|
for await (let doc of profiles.docs) {
|
|
2695
2695
|
doc = await get_account_profile_info(uid, doc);
|
|
2696
2696
|
if (doc.reserve) {
|
|
2697
|
+
profile_docs.docs.unshift(doc);
|
|
2697
2698
|
} else {
|
|
2698
2699
|
profile_docs.docs.push(doc);
|
|
2699
2700
|
}
|
|
@@ -2755,7 +2756,7 @@ export const delete_account_profile = async function (req, job_id, headers) {
|
|
|
2755
2756
|
account_profile_doc.stat_reason = 'deleted by the user';
|
|
2756
2757
|
|
|
2757
2758
|
const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
|
|
2758
|
-
|
|
2759
|
+
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
2759
2760
|
ai_module.delete_depended_chats(uid, profile_id);
|
|
2760
2761
|
return account_profile_save_ret;
|
|
2761
2762
|
} catch (err) {
|