@xuda.io/account_module 1.2.1776 → 1.2.1777
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 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2102,7 +2102,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2102
2102
|
let account_type_info;
|
|
2103
2103
|
let account_type;
|
|
2104
2104
|
let cached_contact;
|
|
2105
|
-
let
|
|
2105
|
+
let business_has_person;
|
|
2106
2106
|
if (contact_uid) {
|
|
2107
2107
|
let { code: account_code, data: account_obj } = await db_module.get_couch_doc('xuda_accounts', contact_uid);
|
|
2108
2108
|
// account_info = account_obj.account_info;
|
|
@@ -2133,7 +2133,7 @@ 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
|
+
business_has_person = await ai_module.is_business_contact_has_person(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
2137
2137
|
}
|
|
2138
2138
|
if (_.isEmpty(cached_contact) && account_type === 'business' && !account_type_info.is_real_person) {
|
|
2139
2139
|
const domain = email.includes('@') ? email.split('@')[1] : '';
|
|
@@ -2164,7 +2164,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2164
2164
|
team_req_id,
|
|
2165
2165
|
metadata,
|
|
2166
2166
|
is_spam: cached_contact?.is_spam || is_spam,
|
|
2167
|
-
|
|
2167
|
+
business_has_person: cached_contact?.business_has_person || business_has_person,
|
|
2168
2168
|
|
|
2169
2169
|
account_profiles: [account_profile_obj._id],
|
|
2170
2170
|
account_type: cached_contact?.account_type || account_type,
|