@xuda.io/account_module 1.2.1837 → 1.2.1839
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2122,7 +2122,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2122
2122
|
selector: {
|
|
2123
2123
|
docType: 'contact',
|
|
2124
2124
|
stat: { $ne: 4 },
|
|
2125
|
-
email,
|
|
2125
|
+
email: email.toLowerCase(),
|
|
2126
2126
|
},
|
|
2127
2127
|
limit: 1,
|
|
2128
2128
|
fields: ['_id'],
|
|
@@ -2153,6 +2153,10 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2153
2153
|
|
|
2154
2154
|
set_account_profile_picture(uid, contact_uid, metadata, job_id, headers, account_profile_info);
|
|
2155
2155
|
} else {
|
|
2156
|
+
if (email.contains('unsubscribe')) {
|
|
2157
|
+
is_spam = true;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2156
2160
|
// contact without use account
|
|
2157
2161
|
cached_contact = await get_xuda_cache(uid, 'contact', email, 'metadata');
|
|
2158
2162
|
// if (_.isEmpty(cached_contact) && account_type === 'business') {
|
|
@@ -2200,7 +2204,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2200
2204
|
const d = Date.now();
|
|
2201
2205
|
const contact_obj = {
|
|
2202
2206
|
_id: await _common.xuda_get_uuid('contact'),
|
|
2203
|
-
email,
|
|
2207
|
+
email: email.toLowerCase(),
|
|
2204
2208
|
name: cached_contact?.name || name,
|
|
2205
2209
|
stat: stat || 3,
|
|
2206
2210
|
date_created: metadata.email_data ? new Date(metadata.email_data).getTime() : d,
|