@xuda.io/account_module 1.2.1757 → 1.2.1758

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 +62 -62
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1144,74 +1144,74 @@ const get_contact_pattern = async function (doc) {
1144
1144
  if (doc?.account_type_info?.is_real_person && doc?.person_info?.person_full_name !== 'Not available') {
1145
1145
  ret = doc.profile_picture;
1146
1146
  }
1147
- }
1148
-
1149
- // if (doc.my_contact) {
1150
- // if (doc.account_type === 'business') {
1151
- // ret = doc.profile_picture;
1152
- // } else {
1153
- // switch (doc.avatar_source) {
1154
- // case 'fictional':
1155
- // ret = `fictional-avatar-pattern.png`;
1156
- // break;
1157
-
1158
- // case 'ai profile':
1159
- // ret = `fictional-avatar-pattern.png`;
1160
- // break;
1161
-
1162
- // case 'authentic profile':
1163
- // ret = `authentic-avatar-pattern.png`;
1164
- // break;
1147
+ } else {
1148
+ // if (doc.my_contact) {
1149
+ // if (doc.account_type === 'business') {
1150
+ // ret = doc.profile_picture;
1151
+ // } else {
1152
+ // switch (doc.avatar_source) {
1153
+ // case 'fictional':
1154
+ // ret = `fictional-avatar-pattern.png`;
1155
+ // break;
1156
+
1157
+ // case 'ai profile':
1158
+ // ret = `fictional-avatar-pattern.png`;
1159
+ // break;
1160
+
1161
+ // case 'authentic profile':
1162
+ // ret = `authentic-avatar-pattern.png`;
1163
+ // break;
1164
+
1165
+ // default:
1166
+ // ret = `xu-pattern.png`;
1167
+ // break;
1168
+ // }
1169
+ // }
1170
+ // } else
1165
1171
 
1166
- // default:
1167
- // ret = `xu-pattern.png`;
1168
- // break;
1169
- // }
1170
- // }
1171
- // } else
1172
-
1173
- if (doc?.shared_from_uid) {
1174
- //&& (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1175
- // pending or active share request
1176
- const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1177
- ret = shared_from_uid_ret.data.profile_avatar;
1178
- }
1179
- // else if (doc?.reference_doc?.shared_from_uid) {
1180
- // //active share
1181
- // const shared_from_uid_ret = await get_account_name({ uid_query: doc.reference_doc.shared_from_uid });
1182
- // ret = shared_from_uid_ret.data.profile_avatar;
1183
- // }
1184
- else if (doc.contact_uid) {
1185
- switch (doc.avatar_source) {
1186
- case 'fictional':
1187
- ret = `fictional-avatar-pattern.png`;
1188
- break;
1172
+ if (doc?.shared_from_uid) {
1173
+ //&& (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1174
+ // pending or active share request
1175
+ const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1176
+ ret = shared_from_uid_ret.data.profile_avatar;
1177
+ }
1178
+ // else if (doc?.reference_doc?.shared_from_uid) {
1179
+ // //active share
1180
+ // const shared_from_uid_ret = await get_account_name({ uid_query: doc.reference_doc.shared_from_uid });
1181
+ // ret = shared_from_uid_ret.data.profile_avatar;
1182
+ // }
1183
+ else if (doc.contact_uid) {
1184
+ switch (doc.avatar_source) {
1185
+ case 'fictional':
1186
+ ret = `fictional-avatar-pattern.png`;
1187
+ break;
1189
1188
 
1190
- case 'ai profile':
1191
- ret = `fictional-avatar-pattern.png`;
1192
- break;
1189
+ case 'ai profile':
1190
+ ret = `fictional-avatar-pattern.png`;
1191
+ break;
1193
1192
 
1194
- case 'authentic profile':
1195
- ret = `authentic-avatar-pattern.png`;
1196
- break;
1193
+ case 'authentic profile':
1194
+ ret = `authentic-avatar-pattern.png`;
1195
+ break;
1197
1196
 
1198
- default:
1199
- ret = `xu-pattern.png`;
1200
- break;
1201
- }
1202
- } else {
1203
- switch (doc.source) {
1204
- case 'read emails': {
1205
- ret = `email-pattern.png`;
1206
- break;
1207
- }
1208
- case 'web': {
1209
- ret = `web-pattern.png`;
1210
- break;
1197
+ default:
1198
+ ret = `xu-pattern.png`;
1199
+ break;
1211
1200
  }
1201
+ } else {
1202
+ switch (doc.source) {
1203
+ case 'read emails': {
1204
+ ret = `email-pattern.png`;
1205
+ break;
1206
+ }
1207
+ case 'web': {
1208
+ ret = `web-pattern.png`;
1209
+ break;
1210
+ }
1212
1211
 
1213
- default:
1214
- break;
1212
+ default:
1213
+ break;
1214
+ }
1215
1215
  }
1216
1216
  }
1217
1217
  return ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1757",
3
+ "version": "1.2.1758",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {