@xuda.io/account_module 1.2.1781 → 1.2.1783
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 +25 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2095,6 +2095,30 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2095
2095
|
return { code: -1, data: 'contact already exist', contact_id: user_contacts.docs[0]._id };
|
|
2096
2096
|
}
|
|
2097
2097
|
|
|
2098
|
+
function identifyPersonalProvider(domain) {
|
|
2099
|
+
const providers = {
|
|
2100
|
+
'gmail.com': 'Google Gmail',
|
|
2101
|
+
'googlemail.com': 'Google Gmail',
|
|
2102
|
+
'outlook.com': 'Microsoft Outlook',
|
|
2103
|
+
'hotmail.com': 'Microsoft Hotmail',
|
|
2104
|
+
'live.com': 'Microsoft Live',
|
|
2105
|
+
'yahoo.com': 'Yahoo Mail',
|
|
2106
|
+
'ymail.com': 'Yahoo Mail',
|
|
2107
|
+
'aol.com': 'AOL Mail',
|
|
2108
|
+
'icloud.com': 'Apple iCloud',
|
|
2109
|
+
'me.com': 'Apple iCloud',
|
|
2110
|
+
'mac.com': 'Apple iCloud',
|
|
2111
|
+
'protonmail.com': 'ProtonMail',
|
|
2112
|
+
'proton.me': 'ProtonMail',
|
|
2113
|
+
'zoho.com': 'Zoho Mail',
|
|
2114
|
+
'yandex.com': 'Yandex Mail',
|
|
2115
|
+
'mail.com': 'Mail.com',
|
|
2116
|
+
'gmx.com': 'GMX Mail',
|
|
2117
|
+
};
|
|
2118
|
+
|
|
2119
|
+
return providers[domain.toLowerCase()];
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2098
2122
|
/////////////////
|
|
2099
2123
|
|
|
2100
2124
|
let is_spam = false;
|
|
@@ -2135,6 +2159,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2135
2159
|
if (is_business) {
|
|
2136
2160
|
const business_info = await ai_module.get_business_info(uid, '', contact_obj.email, account_profile_info);
|
|
2137
2161
|
if (business_info.business_name !== 'Not available') {
|
|
2162
|
+
//&& !identifyPersonalProvider(business_info.business_domain)
|
|
2138
2163
|
business_has_person = await ai_module.is_business_contact_has_person(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
|
|
2139
2164
|
} else {
|
|
2140
2165
|
account_type = 'personal';
|