@xuda.io/account_module 1.2.1756 → 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.
- package/index.mjs +63 -62
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1142,75 +1142,76 @@ const get_contact_pattern = async function (doc) {
|
|
|
1142
1142
|
|
|
1143
1143
|
if (doc.account_type === 'business') {
|
|
1144
1144
|
if (doc?.account_type_info?.is_real_person && doc?.person_info?.person_full_name !== 'Not available') {
|
|
1145
|
+
ret = doc.profile_picture;
|
|
1145
1146
|
}
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
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
|
|
1164
1171
|
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
//
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
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;
|
|
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;
|
|
1188
1188
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1189
|
+
case 'ai profile':
|
|
1190
|
+
ret = `fictional-avatar-pattern.png`;
|
|
1191
|
+
break;
|
|
1192
1192
|
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1193
|
+
case 'authentic profile':
|
|
1194
|
+
ret = `authentic-avatar-pattern.png`;
|
|
1195
|
+
break;
|
|
1196
1196
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
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;
|
|
1197
|
+
default:
|
|
1198
|
+
ret = `xu-pattern.png`;
|
|
1199
|
+
break;
|
|
1210
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
|
+
}
|
|
1211
1211
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1212
|
+
default:
|
|
1213
|
+
break;
|
|
1214
|
+
}
|
|
1214
1215
|
}
|
|
1215
1216
|
}
|
|
1216
1217
|
return ret;
|