@xuda.io/account_module 1.2.937 → 1.2.939

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 +7 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1910,7 +1910,13 @@ export const add_contact = async function (req, job_id, headers) {
1910
1910
  }
1911
1911
  } else {
1912
1912
  if (metadata.subject && !metadata.is_sent) {
1913
- is_spam = await ai_module.is_spam_email(uid, email, metadata.subject);
1913
+ is_spam_ret = await ai_module.is_spam_email(uid, email, metadata.subject);
1914
+ try {
1915
+ if (is_spam_ret.code > -1) {
1916
+ const data = JSON.parse(is_spam_ret.data);
1917
+ is_spam = data.is_spam;
1918
+ }
1919
+ } catch (error) {}
1914
1920
  }
1915
1921
  }
1916
1922
  const d = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.937",
3
+ "version": "1.2.939",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {