@xuda.io/account_module 1.2.1368 → 1.2.1369
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 +2 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1990,7 +1990,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1990
1990
|
is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
|
|
1991
1991
|
}
|
|
1992
1992
|
|
|
1993
|
-
const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.
|
|
1993
|
+
const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
1994
1994
|
|
|
1995
1995
|
// const existing_contacts_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: email });
|
|
1996
1996
|
// for (const contact of existing_contacts_ret.rows) {
|
|
@@ -2021,6 +2021,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2021
2021
|
profile_avatar,
|
|
2022
2022
|
profile_avatar_obj,
|
|
2023
2023
|
account_profiles: [account_profile_obj._id],
|
|
2024
|
+
account_type: is_business ? 'business' : 'personal',
|
|
2024
2025
|
};
|
|
2025
2026
|
const save_ret = await save_contact(uid, doc);
|
|
2026
2027
|
|