@xuda.io/account_module 1.2.794 → 1.2.795

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 +18 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1261,7 +1261,7 @@ const get_contact_pattern = async function (doc) {
1261
1261
  break;
1262
1262
 
1263
1263
  default:
1264
- ret = `my-pattern.png`;
1264
+ ret = `xu-pattern.png`;
1265
1265
  break;
1266
1266
  }
1267
1267
  }
@@ -1269,7 +1269,23 @@ const get_contact_pattern = async function (doc) {
1269
1269
  const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1270
1270
  ret = shared_from_uid_ret.data.profile_avatar;
1271
1271
  } else if (doc.contact_uid) {
1272
- ret = `xu-pattern.png`;
1272
+ switch (doc.avatar_source) {
1273
+ case 'fictional':
1274
+ ret = `fictional-avatar-pattern.png`;
1275
+ break;
1276
+
1277
+ case 'ai profile':
1278
+ ret = `fictional-avatar-pattern.png`;
1279
+ break;
1280
+
1281
+ case 'authentic profile':
1282
+ ret = `authentic-avatar-pattern.png`;
1283
+ break;
1284
+
1285
+ default:
1286
+ ret = `xu-pattern.png`;
1287
+ break;
1288
+ }
1273
1289
  } else {
1274
1290
  switch (doc.source) {
1275
1291
  case 'email': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.794",
3
+ "version": "1.2.795",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {