@xuda.io/account_module 1.2.762 → 1.2.764

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 +10 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -175,15 +175,6 @@ export const update_account_info = async function (req, job_id, headers) {
175
175
  // }
176
176
  // }
177
177
 
178
- const ai_module = await import(`${module_path}/ai_module/index.mjs`);
179
- if (account_obj.account_info?.profile_picture) {
180
- if (!account_obj.account_info?.profile_avatar) {
181
- ai_module.convert_profile_image_to_avatar({ url: account_obj.account_info?.profile_picture, uid, account_obj }, job_id, headers);
182
- }
183
- } else {
184
- ai_module.update_thumbnail('account', account_obj, account_obj.account_project_id, uid, job_id, headers, 'xuda_accounts');
185
- }
186
-
187
178
  // temp remove later on
188
179
 
189
180
  // let drive_req = { app_id: account_obj.account_project_id, uid, path: '/' };
@@ -196,6 +187,15 @@ export const update_account_info = async function (req, job_id, headers) {
196
187
 
197
188
  const ret2 = await db_module.save_couch_doc('xuda_accounts', account_obj);
198
189
 
190
+ const ai_module = await import(`${module_path}/ai_module/index.mjs`);
191
+ if (account_obj.account_info?.profile_picture) {
192
+ if (!account_obj.account_info?.profile_avatar) {
193
+ ai_module.convert_profile_image_to_avatar({ url: account_obj.account_info?.profile_picture, uid, account_obj }, job_id, headers);
194
+ }
195
+ } else {
196
+ ai_module.update_thumbnail('account', account_obj, account_obj.account_project_id, uid, job_id, headers, 'xuda_accounts');
197
+ }
198
+
199
199
  // update_contacts_with_account_changes(account_obj._id, account_info_changes_arr);
200
200
 
201
201
  if (ret2.code > 0) {
@@ -1742,7 +1742,7 @@ export const add_contact = async function (req, job_id, headers) {
1742
1742
  const app_id = await get_account_default_project_id(uid);
1743
1743
  const ai_module = await import(`${module_path}/ai_module/index.mjs`);
1744
1744
  if (account_info_ret?.data?.profile_avatar) {
1745
- account_info_ret.data.profile_avatar_stat = 2;
1745
+ // account_info_ret.data.profile_avatar_stat = 2;
1746
1746
  ai_module.convert_profile_image_to_avatar({ url: account_info_ret.data.profile_picture, uid, account_obj: { _id: contact_uid, account_info: account_info_ret.data } }, job_id, headers);
1747
1747
  } else {
1748
1748
  // create factual avatar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.762",
3
+ "version": "1.2.764",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {