@xuda.io/account_module 1.2.369 → 1.2.371

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 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1190,6 +1190,14 @@ export const get_contacts = async function (req) {
1190
1190
  }
1191
1191
 
1192
1192
  const contacts_ret = await db_module.find_couch_query('xuda_contacts', opt);
1193
+
1194
+ for await (let doc of contacts_ret.data.docs) {
1195
+ const account_ret = await get_account_name({ uid_query: contact_uid });
1196
+ if (account_ret.code < 0) {
1197
+ throw new Error(`account ${contact_uid} not found`);
1198
+ }
1199
+ }
1200
+
1193
1201
  let requests_from_ret = { docs: [] };
1194
1202
  let requests_to_ret = { docs: [] };
1195
1203
 
@@ -1292,7 +1300,7 @@ export const add_contact = async function (req, job_id, headers) {
1292
1300
  if (!account_ret.data.profile_avatar) {
1293
1301
  const app_id = await get_account_default_project_id(uid);
1294
1302
  const ai_module = await import(`${module_path}/ai_module/index.mjs`);
1295
- ai_module.update_thumbnail('contact', doc, app_id, uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact']);
1303
+ ai_module.update_thumbnail('contact', doc, app_id, uid, job_id, headers, 'xuda_contacts', [email, doc._id, 'contact', app_id]);
1296
1304
  }
1297
1305
  return ret;
1298
1306
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.369",
3
+ "version": "1.2.371",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {