@xuda.io/account_module 1.2.1712 → 1.2.1714
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 +5 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2104,9 +2104,10 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2104
2104
|
is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
|
|
2105
2105
|
}
|
|
2106
2106
|
|
|
2107
|
-
account_type_info = await ai_module.analyze_email_account_type(uid,
|
|
2108
|
-
|
|
2109
|
-
|
|
2107
|
+
account_type_info = await ai_module.analyze_email_account_type(uid, name, email, account_profile_info, metadata?.summarized_body);
|
|
2108
|
+
account_type = account_type_info.account_type;
|
|
2109
|
+
// const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
2110
|
+
// account_type = is_business ? 'business' : 'personal';
|
|
2110
2111
|
}
|
|
2111
2112
|
}
|
|
2112
2113
|
|
|
@@ -2131,6 +2132,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2131
2132
|
|
|
2132
2133
|
account_profiles: [account_profile_obj._id],
|
|
2133
2134
|
account_type: cached_contact?.account_type || account_type,
|
|
2135
|
+
account_type_info: cached_contact?.account_type_info || account_type_info,
|
|
2134
2136
|
};
|
|
2135
2137
|
if (!_.isEmpty(cached_contact?.business_info)) {
|
|
2136
2138
|
contact_obj.business_info = _.cloneDeep(cached_contact.business_info);
|