@xuda.io/account_module 1.2.1369 → 1.2.1371

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1979,6 +1979,7 @@ export const add_contact = async function (req, job_id, headers) {
1979
1979
  let is_spam = false;
1980
1980
  let profile_avatar, profile_avatar_obj;
1981
1981
  let account_info_ret;
1982
+ let account_type;
1982
1983
  if (contact_uid) {
1983
1984
  account_info_ret = await get_account_name({ uid_query: contact_uid });
1984
1985
  if (account_info_ret.code < 0) {
@@ -1991,7 +1992,7 @@ export const add_contact = async function (req, job_id, headers) {
1991
1992
  }
1992
1993
 
1993
1994
  const is_business = await ai_module.is_business_contact(uid, email, name, metadata.subject, metadata.summarized_body, account_profile_info);
1994
-
1995
+ account_type = is_business ? 'business' : 'personal';
1995
1996
  // const existing_contacts_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: email });
1996
1997
  // for (const contact of existing_contacts_ret.rows) {
1997
1998
  // if (contact.value.profile_avatar) {
@@ -2021,7 +2022,7 @@ export const add_contact = async function (req, job_id, headers) {
2021
2022
  profile_avatar,
2022
2023
  profile_avatar_obj,
2023
2024
  account_profiles: [account_profile_obj._id],
2024
- account_type: is_business ? 'business' : 'personal',
2025
+ account_type,
2025
2026
  };
2026
2027
  const save_ret = await save_contact(uid, doc);
2027
2028
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1369",
3
+ "version": "1.2.1371",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {