@xuda.io/account_module 1.2.1691 → 1.2.1693

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 +34 -32
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1139,7 +1139,7 @@ const get_contact_background = function (doc) {
1139
1139
 
1140
1140
  const get_contact_pattern = async function (doc) {
1141
1141
  let ret = `default-pattern.png`;
1142
- debugger;
1142
+
1143
1143
  // if (doc.my_contact) {
1144
1144
  // if (doc.account_type === 'business') {
1145
1145
  // ret = doc.profile_picture;
@@ -1175,39 +1175,39 @@ const get_contact_pattern = async function (doc) {
1175
1175
  // const shared_from_uid_ret = await get_account_name({ uid_query: doc.reference_doc.shared_from_uid });
1176
1176
  // ret = shared_from_uid_ret.data.profile_avatar;
1177
1177
  // }
1178
- else if (doc.contact_uid) {
1179
- switch (doc.avatar_source) {
1180
- case 'fictional':
1181
- ret = `fictional-avatar-pattern.png`;
1182
- break;
1183
-
1184
- case 'ai profile':
1185
- ret = `fictional-avatar-pattern.png`;
1186
- break;
1178
+ // else if (doc.contact_uid) {
1179
+ switch (doc.avatar_source) {
1180
+ case 'fictional':
1181
+ ret = `fictional-avatar-pattern.png`;
1182
+ break;
1187
1183
 
1188
- case 'authentic profile':
1189
- ret = `authentic-avatar-pattern.png`;
1190
- break;
1184
+ case 'ai profile':
1185
+ ret = `fictional-avatar-pattern.png`;
1186
+ break;
1191
1187
 
1192
- default:
1193
- ret = `xu-pattern.png`;
1194
- break;
1195
- }
1196
- } else {
1197
- switch (doc.source) {
1198
- case 'email': {
1199
- ret = `email-pattern.png`;
1200
- break;
1201
- }
1202
- case 'web': {
1203
- ret = `web-pattern.png`;
1204
- break;
1205
- }
1188
+ case 'authentic profile':
1189
+ ret = `authentic-avatar-pattern.png`;
1190
+ break;
1206
1191
 
1207
- default:
1208
- break;
1209
- }
1192
+ default:
1193
+ ret = `xu-pattern.png`;
1194
+ break;
1210
1195
  }
1196
+ // } else {
1197
+ // switch (doc.source) {
1198
+ // case 'email': {
1199
+ // ret = `email-pattern.png`;
1200
+ // break;
1201
+ // }
1202
+ // case 'web': {
1203
+ // ret = `web-pattern.png`;
1204
+ // break;
1205
+ // }
1206
+
1207
+ // default:
1208
+ // break;
1209
+ // }
1210
+ // }
1211
1211
  return ret;
1212
1212
  };
1213
1213
 
@@ -1356,9 +1356,9 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1356
1356
  doc.connection_stat = 0;
1357
1357
  }
1358
1358
  }
1359
- debugger;
1359
+
1360
1360
  doc.avatar_source = account_info_ret.data.avatar_source;
1361
- doc.icon_pattern = await get_contact_pattern(doc);
1361
+ // doc.icon_pattern = await get_contact_pattern(doc);
1362
1362
  doc.username = account_info_ret.data.username;
1363
1363
  doc.business_name = account_info_ret.data.business_name;
1364
1364
  doc.address = account_info_ret.data.address;
@@ -1374,6 +1374,8 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1374
1374
  doc.email = doc.email;
1375
1375
  }
1376
1376
 
1377
+ doc.icon_pattern = await get_contact_pattern(doc);
1378
+
1377
1379
  const contact_chat_conversation_count_ret = await chat_conversation_count();
1378
1380
  const contact_chat_conversation_read_ret = await chat_conversation_read();
1379
1381
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1691",
3
+ "version": "1.2.1693",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {