@xuda.io/account_module 1.2.1366 → 1.2.1368

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.
Files changed (2) hide show
  1. package/index.mjs +3 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1987,15 +1987,11 @@ export const add_contact = async function (req, job_id, headers) {
1987
1987
  } else {
1988
1988
  // contact without use account
1989
1989
  if (metadata.subject && !metadata.is_sent) {
1990
- const is_spam_ret = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
1991
- try {
1992
- if (is_spam_ret.code > -1) {
1993
- const data = JSON.parse(is_spam_ret.data);
1994
- is_spam = data.is_spam;
1995
- }
1996
- } catch (error) {}
1990
+ is_spam = await ai_module.is_spam_email(uid, email, metadata.subject, account_profile_info);
1997
1991
  }
1998
1992
 
1993
+ const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.body, account_profile_info);
1994
+
1999
1995
  // const existing_contacts_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: email });
2000
1996
  // for (const contact of existing_contacts_ret.rows) {
2001
1997
  // if (contact.value.profile_avatar) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1366",
3
+ "version": "1.2.1368",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {