@xuda.io/account_module 1.2.1779 → 1.2.1781
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2133,7 +2133,12 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2133
2133
|
const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
2134
2134
|
account_type = is_business ? 'business' : 'personal';
|
|
2135
2135
|
if (is_business) {
|
|
2136
|
-
|
|
2136
|
+
const business_info = await ai_module.get_business_info(uid, '', contact_obj.email, account_profile_info);
|
|
2137
|
+
if (business_info.business_name !== 'Not available') {
|
|
2138
|
+
business_has_person = await ai_module.is_business_contact_has_person(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
2139
|
+
} else {
|
|
2140
|
+
account_type = 'personal';
|
|
2141
|
+
}
|
|
2137
2142
|
}
|
|
2138
2143
|
if (_.isEmpty(cached_contact) && account_type === 'business' && !business_has_person) {
|
|
2139
2144
|
const domain = email.includes('@') ? email.split('@')[1] : '';
|