@xuda.io/account_module 1.2.1836 → 1.2.1837

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 +71 -71
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1158,82 +1158,82 @@ const get_contact_pattern = async function (doc) {
1158
1158
  } else if (doc.is_spam) {
1159
1159
  ret = `spam-pattern.png`;
1160
1160
  } else {
1161
- if (doc.account_type === 'business') {
1162
- // if (doc?.is_real_person) {
1163
- ret = doc.profile_picture;
1164
- // }
1165
- } else {
1166
- // if (doc.my_contact) {
1167
- // if (doc.account_type === 'business') {
1168
- // ret = doc.profile_picture;
1169
- // } else {
1170
- // switch (doc.avatar_source) {
1171
- // case 'fictional':
1172
- // ret = `fictional-avatar-pattern.png`;
1173
- // break;
1174
-
1175
- // case 'ai profile':
1176
- // ret = `fictional-avatar-pattern.png`;
1177
- // break;
1178
-
1179
- // case 'authentic profile':
1180
- // ret = `authentic-avatar-pattern.png`;
1181
- // break;
1182
-
1183
- // default:
1184
- // ret = `xu-pattern.png`;
1185
- // break;
1186
- // }
1187
- // }
1188
- // } else
1189
-
1190
- // if (doc?.shared_from_uid) {
1191
- // //&& (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1192
- // // pending or active share request
1193
- // const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1194
- // ret = shared_from_uid_ret.data.profile_avatar;
1195
- // }
1161
+ // if (doc.account_type === 'business') {
1162
+ // // if (doc?.is_real_person) {
1163
+ // ret = doc.profile_picture;
1164
+ // // }
1165
+ // } else {
1166
+ // if (doc.my_contact) {
1167
+ // if (doc.account_type === 'business') {
1168
+ // ret = doc.profile_picture;
1169
+ // } else {
1170
+ // switch (doc.avatar_source) {
1171
+ // case 'fictional':
1172
+ // ret = `fictional-avatar-pattern.png`;
1173
+ // break;
1174
+
1175
+ // case 'ai profile':
1176
+ // ret = `fictional-avatar-pattern.png`;
1177
+ // break;
1178
+
1179
+ // case 'authentic profile':
1180
+ // ret = `authentic-avatar-pattern.png`;
1181
+ // break;
1182
+
1183
+ // default:
1184
+ // ret = `xu-pattern.png`;
1185
+ // break;
1186
+ // }
1187
+ // }
1188
+ // } else
1196
1189
 
1197
- // else if (doc?.reference_doc?.shared_from_uid) {
1198
- // //active share
1199
- // const shared_from_uid_ret = await get_account_name({ uid_query: doc.reference_doc.shared_from_uid });
1200
- // ret = shared_from_uid_ret.data.profile_avatar;
1201
- // }
1202
- // else
1203
- if (doc.contact_uid) {
1204
- switch (doc.avatar_source) {
1205
- case 'fictional':
1206
- ret = `fictional-avatar-pattern.png`;
1207
- break;
1208
-
1209
- case 'ai profile':
1210
- ret = `fictional-avatar-pattern.png`;
1211
- break;
1212
-
1213
- case 'authentic profile':
1214
- ret = `authentic-avatar-pattern.png`;
1215
- break;
1216
-
1217
- default:
1218
- ret = `xu-pattern.png`;
1219
- break;
1220
- }
1221
- } else {
1222
- switch (doc.source) {
1223
- case 'read emails': {
1224
- ret = `email-pattern.png`;
1225
- break;
1226
- }
1227
- case 'web': {
1228
- ret = `web-pattern.png`;
1229
- break;
1230
- }
1190
+ // if (doc?.shared_from_uid) {
1191
+ // //&& (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1192
+ // // pending or active share request
1193
+ // const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1194
+ // ret = shared_from_uid_ret.data.profile_avatar;
1195
+ // }
1196
+
1197
+ // else if (doc?.reference_doc?.shared_from_uid) {
1198
+ // //active share
1199
+ // const shared_from_uid_ret = await get_account_name({ uid_query: doc.reference_doc.shared_from_uid });
1200
+ // ret = shared_from_uid_ret.data.profile_avatar;
1201
+ // }
1202
+ // else
1203
+ if (doc.contact_uid) {
1204
+ switch (doc.avatar_source) {
1205
+ case 'fictional':
1206
+ ret = `fictional-avatar-pattern.png`;
1207
+ break;
1208
+
1209
+ case 'ai profile':
1210
+ ret = `fictional-avatar-pattern.png`;
1211
+ break;
1212
+
1213
+ case 'authentic profile':
1214
+ ret = `authentic-avatar-pattern.png`;
1215
+ break;
1231
1216
 
1232
- default:
1233
- break;
1217
+ default:
1218
+ ret = `xu-pattern.png`;
1219
+ break;
1220
+ }
1221
+ } else {
1222
+ switch (doc.source) {
1223
+ case 'read emails': {
1224
+ ret = `email-pattern.png`;
1225
+ break;
1226
+ }
1227
+ case 'web': {
1228
+ ret = `web-pattern.png`;
1229
+ break;
1234
1230
  }
1231
+
1232
+ default:
1233
+ break;
1235
1234
  }
1236
1235
  }
1236
+ // }
1237
1237
  }
1238
1238
  return ret;
1239
1239
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1836",
3
+ "version": "1.2.1837",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {