@xuda.io/account_module 1.2.1601 → 1.2.1603
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 +11 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1956,7 +1956,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1956
1956
|
/////////////////
|
|
1957
1957
|
|
|
1958
1958
|
let is_spam = false;
|
|
1959
|
-
|
|
1959
|
+
debugger;
|
|
1960
1960
|
let account_type;
|
|
1961
1961
|
if (contact_uid) {
|
|
1962
1962
|
let { code: account_code, data: account_obj } = await db_module.get_couch_doc('xuda_accounts', contact_uid);
|
|
@@ -3163,3 +3163,13 @@ export const read_accounts_emails = async function () {
|
|
|
3163
3163
|
email_module.refresh_mailboxes({ uid: account_doc._id });
|
|
3164
3164
|
}
|
|
3165
3165
|
};
|
|
3166
|
+
|
|
3167
|
+
export const process_accounts_emails = async function () {
|
|
3168
|
+
const email_module = await import(`${module_path}/email_module/index.mjs`);
|
|
3169
|
+
|
|
3170
|
+
const active_accounts = await db_module.find_couch_query('xuda_accounts', { selector: { stat: 3, docType: 'account' }, limit: 99999 });
|
|
3171
|
+
for await (let account_doc of active_accounts.docs) {
|
|
3172
|
+
if (!account_doc?.account_info?.active_account_profile_id) continue;
|
|
3173
|
+
email_module.process_emails({ uid: account_doc._id });
|
|
3174
|
+
}
|
|
3175
|
+
};
|