@xuda.io/account_module 1.2.2231 → 1.2.2233
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 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2060,8 +2060,6 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2060
2060
|
profile_avatar_stat: 0,
|
|
2061
2061
|
};
|
|
2062
2062
|
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
2063
|
if (!is_spam) {
|
|
2066
2064
|
if (account_type === 'personal' || contact_obj?.business_has_person) {
|
|
2067
2065
|
contact_obj.person_info = await ai_ms.get_person_info(uid, contact_obj.name, contact_obj.email, account_profile_info, metadata?.summarized_body, { light: true });
|
|
@@ -2070,10 +2068,8 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2070
2068
|
}
|
|
2071
2069
|
}
|
|
2072
2070
|
|
|
2073
|
-
const conversation_obj = await ai_ms.create_openai_conversation();
|
|
2074
|
-
contact_obj.contact_reference_conversation_id= conversation_obj.id
|
|
2075
|
-
|
|
2076
|
-
|
|
2071
|
+
const conversation_obj = await ai_ms.create_openai_conversation();
|
|
2072
|
+
contact_obj.contact_reference_conversation_id = conversation_obj.id;
|
|
2077
2073
|
} else {
|
|
2078
2074
|
if (!contact_obj.name) {
|
|
2079
2075
|
contact_obj.name = '';
|
|
@@ -2665,6 +2661,10 @@ export const not_spam_contact = async function (req, job_id, headers) {
|
|
|
2665
2661
|
}
|
|
2666
2662
|
contact_doc.is_spam = false;
|
|
2667
2663
|
|
|
2664
|
+
if (!contact_doc.contact_reference_conversation_id) {
|
|
2665
|
+
contact_doc.contact_reference_conversation_id = conversation_obj.id;
|
|
2666
|
+
}
|
|
2667
|
+
|
|
2668
2668
|
const is_business = await ai_ms.is_business_contact(uid, contact_doc.email, contact_doc.name, contact_doc?.metadata?.subject, contact_doc?.metadata?.summarized_body, account_profile_info);
|
|
2669
2669
|
contact_doc.account_type = is_business ? 'business' : 'personal';
|
|
2670
2670
|
if (is_business) {
|