@xuda.io/account_module 1.2.932 → 1.2.934
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 +4 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1046,7 +1046,7 @@ export const read_emails = async function (req, job_id, headers) {
|
|
|
1046
1046
|
// uid,
|
|
1047
1047
|
// });
|
|
1048
1048
|
// }
|
|
1049
|
-
await add_contact({ uid, name, email, metadata: { subject, is_sent } }, job_id, headers);
|
|
1049
|
+
await add_contact({ uid, name, email, metadata: { subject, is_sent }, source: 'read emails' }, job_id, headers);
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
};
|
|
@@ -1907,6 +1907,9 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1907
1907
|
throw new Error(`account ${contact_uid} not found`);
|
|
1908
1908
|
}
|
|
1909
1909
|
} else {
|
|
1910
|
+
if (subject && !metadata.is_sent) {
|
|
1911
|
+
const is_spam = await ai_module.is_spam_email(uid, email_address, subject);
|
|
1912
|
+
}
|
|
1910
1913
|
}
|
|
1911
1914
|
const d = Date.now();
|
|
1912
1915
|
const doc = {
|