@xuda.io/account_module 1.2.1706 → 1.2.1708
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 +26 -19
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2134,24 +2134,31 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2134
2134
|
if (!_.isEmpty(cached_contact?.business_info)) {
|
|
2135
2135
|
contact_obj.business_info = _.cloneDeep(cached_contact.business_info);
|
|
2136
2136
|
} else {
|
|
2137
|
-
if (
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2137
|
+
if (!is_spam) {
|
|
2138
|
+
if (account_type === 'business') {
|
|
2139
|
+
contact_obj.business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
|
|
2140
|
+
save_xuda_cache(uid, 'contact', contact_obj.domain, null, contact_obj);
|
|
2141
|
+
|
|
2142
|
+
// const business_info = await ai_module.get_business_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
|
|
2143
|
+
// if (business_info) {
|
|
2144
|
+
// const { business_size, business_category, business_sub_category, business_country, business_bio, business_name } = business_info;
|
|
2145
|
+
// contact_obj.mainCategory = business_category;
|
|
2146
|
+
// contact_obj.subCategory = business_sub_category;
|
|
2147
|
+
// contact_obj.business_size = business_size;
|
|
2148
|
+
// contact_obj.country = business_country;
|
|
2149
|
+
// contact_obj.bio = business_bio;
|
|
2150
|
+
// contact_obj.business_name = business_name;
|
|
2151
|
+
|
|
2152
|
+
// if (!contact_obj.name) {
|
|
2153
|
+
// contact_obj.name = business_name;
|
|
2154
|
+
// }
|
|
2155
|
+
// }
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
if (account_type === 'personal') {
|
|
2159
|
+
contact_obj.person_info = await ai_module.get_person_info(uid, contact_obj.name, contact_obj.email, account_profile_info);
|
|
2160
|
+
save_xuda_cache(uid, 'contact', contact_obj.domain, null, contact_obj);
|
|
2161
|
+
}
|
|
2155
2162
|
} else {
|
|
2156
2163
|
if (!contact_obj.name) {
|
|
2157
2164
|
contact_obj.name = '';
|
|
@@ -2181,7 +2188,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2181
2188
|
save_xuda_cache(uid, 'contact', contact_obj.email, null, contact_obj);
|
|
2182
2189
|
|
|
2183
2190
|
if (!contact_obj.is_spam && contact_obj.name) {
|
|
2184
|
-
set_contact_profile_picture(uid, contact_obj._id, metadata, job_id, headers);
|
|
2191
|
+
// set_contact_profile_picture(uid, contact_obj._id, metadata, job_id, headers);
|
|
2185
2192
|
}
|
|
2186
2193
|
|
|
2187
2194
|
return save_ret;
|