@xuda.io/account_module 1.2.1930 → 1.2.1932

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