@xuda.io/account_module 1.2.1716 → 1.2.1717
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 +6 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2106,6 +2106,12 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2106
2106
|
if (!is_spam) {
|
|
2107
2107
|
account_type_info = await ai_module.analyze_email_account_type(uid, name, email, account_profile_info, metadata?.summarized_body);
|
|
2108
2108
|
account_type = account_type_info.account_type;
|
|
2109
|
+
|
|
2110
|
+
if (_.isEmpty(cached_contact) && account_type === 'business') {
|
|
2111
|
+
const domain = email.includes('@') ? email.split('@')[1] : '';
|
|
2112
|
+
cached_contact = await get_xuda_cache(uid, 'contact', domain, 'metadata');
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2109
2115
|
// const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
2110
2116
|
// account_type = is_business ? 'business' : 'personal';
|
|
2111
2117
|
}
|