@xuda.io/account_module 1.2.1933 → 1.2.1934

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 -8
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -45,7 +45,6 @@ const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi
45
45
  // Module Paths
46
46
  const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
47
47
  const db_module = await import(`${module_path}/db_module/index.mjs`);
48
- const ai_module = await import(`${module_path}/ai_module/index.mjs`);
49
48
 
50
49
  export const update_account_info = async function (req, job_id, headers) {
51
50
  const marketplace_module = await import(`${module_path}/marketplace_module/index.mjs`);
@@ -195,7 +194,7 @@ export const update_account_info = async function (req, job_id, headers) {
195
194
 
196
195
  const save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
197
196
 
198
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
197
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
199
198
 
200
199
  if (account_obj.account_info?.profile_picture) {
201
200
  if (!account_obj.account_info?.profile_avatar && account_obj.account_info.profile_avatar_stat !== 2) {
@@ -1975,7 +1974,7 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
1975
1974
  };
1976
1975
 
1977
1976
  const set_account_profile_picture = async function (uid, account_uid, metadata, job_id, headers, account_profile_info) {
1978
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
1977
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
1979
1978
  // const account_profile_info = await get_active_account_profile_info(uid);
1980
1979
  await update_account_profile_picture_status(account_uid, 1);
1981
1980
  try {
@@ -2117,7 +2116,7 @@ export const add_contact = async function (req, job_id, headers) {
2117
2116
  const account_profile_info = await get_active_account_profile_info(uid, profile_id);
2118
2117
  const { account_profile_obj } = account_profile_info;
2119
2118
 
2120
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2119
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2121
2120
 
2122
2121
  //////////////////
2123
2122
  const opt = {
@@ -2241,7 +2240,7 @@ export const add_contact = async function (req, job_id, headers) {
2241
2240
  };
2242
2241
 
2243
2242
  const set_contact_profile_picture = async function (uid, contact_id, metadata, job_id, headers, account_profile_info, create_avatar) {
2244
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2243
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2245
2244
 
2246
2245
  let contact_obj;
2247
2246
  await update_contact_profile_picture_status(uid, contact_id, 1);
@@ -2607,7 +2606,7 @@ export const delete_contact = async function (req, job_id, headers) {
2607
2606
  contact_doc.stat_reason = 'deleted by the user';
2608
2607
 
2609
2608
  const contact_save_ret = await save_contact(uid, contact_doc);
2610
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2609
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2611
2610
  ai_module.delete_depended_chats(uid, contact_id);
2612
2611
  return contact_save_ret;
2613
2612
  } catch (err) {
@@ -2871,7 +2870,7 @@ export const get_pending_share_profile_in = async function (uid, _id) {
2871
2870
  };
2872
2871
 
2873
2872
  export const get_account_profile_info = async function (uid, contact_profile_doc, _id) {
2874
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2873
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
2875
2874
  const app_id = await get_account_default_project_id(uid);
2876
2875
  let doc = contact_profile_doc;
2877
2876
  if (_id) {
@@ -3176,7 +3175,7 @@ export const delete_account_profile = async function (req, job_id, headers) {
3176
3175
  account_profile_doc.stat_reason = 'deleted by the user';
3177
3176
 
3178
3177
  const account_profile_save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
3179
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
3178
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
3180
3179
  ai_module.delete_depended_chats(uid, profile_id);
3181
3180
  return account_profile_save_ret;
3182
3181
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1933",
3
+ "version": "1.2.1934",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {