@xuda.io/account_module 1.2.1693 → 1.2.1695
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 +42 -32
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -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
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1178
|
+
else if (doc.contact_uid) {
|
|
1179
|
+
switch (doc.avatar_source) {
|
|
1180
|
+
case 'fictional':
|
|
1181
|
+
ret = `fictional-avatar-pattern.png`;
|
|
1182
|
+
break;
|
|
1183
1183
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1184
|
+
case 'ai profile':
|
|
1185
|
+
ret = `fictional-avatar-pattern.png`;
|
|
1186
|
+
break;
|
|
1187
1187
|
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1188
|
+
case 'authentic profile':
|
|
1189
|
+
ret = `authentic-avatar-pattern.png`;
|
|
1190
|
+
break;
|
|
1191
1191
|
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1192
|
+
default:
|
|
1193
|
+
ret = `xu-pattern.png`;
|
|
1194
|
+
break;
|
|
1195
|
+
}
|
|
1196
|
+
} else {
|
|
1197
|
+
switch (doc.source) {
|
|
1198
|
+
case 'read emails': {
|
|
1199
|
+
ret = `email-pattern.png`;
|
|
1200
|
+
break;
|
|
1201
|
+
}
|
|
1202
|
+
case 'web': {
|
|
1203
|
+
ret = `web-pattern.png`;
|
|
1204
|
+
break;
|
|
1205
|
+
}
|
|
1206
1206
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1207
|
+
default:
|
|
1208
|
+
break;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
1211
|
return ret;
|
|
1212
1212
|
};
|
|
1213
1213
|
|
|
@@ -2804,9 +2804,9 @@ export const get_account_profiles = async function (req) {
|
|
|
2804
2804
|
break;
|
|
2805
2805
|
}
|
|
2806
2806
|
|
|
2807
|
-
if (_id) {
|
|
2808
|
-
|
|
2809
|
-
}
|
|
2807
|
+
// if (_id) {
|
|
2808
|
+
// opt.selector._id = _id;
|
|
2809
|
+
// }
|
|
2810
2810
|
|
|
2811
2811
|
if (profile_id) {
|
|
2812
2812
|
opt.selector._id = profile_id;
|
|
@@ -2872,6 +2872,16 @@ export const get_account_profiles = async function (req) {
|
|
|
2872
2872
|
}
|
|
2873
2873
|
}
|
|
2874
2874
|
|
|
2875
|
+
if (!filter_type && !profile_id && !search && profile_docs.docs.length === 1 && profile_docs.docs[0].main) {
|
|
2876
|
+
return {
|
|
2877
|
+
code: 1,
|
|
2878
|
+
data: {
|
|
2879
|
+
docs: [],
|
|
2880
|
+
total_docs: 0,
|
|
2881
|
+
},
|
|
2882
|
+
};
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2875
2885
|
return {
|
|
2876
2886
|
code: 1,
|
|
2877
2887
|
data: {
|