@xuda.io/account_module 1.2.1618 → 1.2.1620
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 +3 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1969,7 +1969,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1969
1969
|
set_account_profile_picture(uid, contact_uid, metadata, job_id, headers);
|
|
1970
1970
|
} else {
|
|
1971
1971
|
// contact without use account
|
|
1972
|
-
|
|
1972
|
+
const cached_contact = await get_xuda_cache(uid, 'contact', email);
|
|
1973
1973
|
if (metadata.subject && !metadata.is_sent) {
|
|
1974
1974
|
is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
|
|
1975
1975
|
}
|
|
@@ -3021,6 +3021,8 @@ export const find_contact_query = async function (uid, opt) {
|
|
|
3021
3021
|
};
|
|
3022
3022
|
|
|
3023
3023
|
export const save_xuda_cache = async function (uid, docType, key, file, metadata = {}) {
|
|
3024
|
+
if (!key || typeof key !== 'string') return null;
|
|
3025
|
+
|
|
3024
3026
|
let doc = {
|
|
3025
3027
|
_id: await _common.xuda_get_uuid('cache'),
|
|
3026
3028
|
key: key.toLowerCase().trim(),
|