@xuda.io/account_module 1.2.1129 → 1.2.1131

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 +24 -21
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1256,29 +1256,32 @@ const get_contact_background = function (doc) {
1256
1256
  const get_contact_pattern = async function (doc) {
1257
1257
  let ret = `default-pattern.png`;
1258
1258
 
1259
- if (doc.my_contact) {
1260
- if (doc.account_type === 'business') {
1261
- ret = doc.profile_picture;
1262
- } else {
1263
- switch (doc.avatar_source) {
1264
- case 'fictional':
1265
- ret = `fictional-avatar-pattern.png`;
1266
- break;
1259
+ // if (doc.my_contact) {
1260
+ // if (doc.account_type === 'business') {
1261
+ // ret = doc.profile_picture;
1262
+ // } else {
1263
+ // switch (doc.avatar_source) {
1264
+ // case 'fictional':
1265
+ // ret = `fictional-avatar-pattern.png`;
1266
+ // break;
1267
1267
 
1268
- case 'ai profile':
1269
- ret = `fictional-avatar-pattern.png`;
1270
- break;
1268
+ // case 'ai profile':
1269
+ // ret = `fictional-avatar-pattern.png`;
1270
+ // break;
1271
1271
 
1272
- case 'authentic profile':
1273
- ret = `authentic-avatar-pattern.png`;
1274
- break;
1272
+ // case 'authentic profile':
1273
+ // ret = `authentic-avatar-pattern.png`;
1274
+ // break;
1275
1275
 
1276
- default:
1277
- ret = `xu-pattern.png`;
1278
- break;
1279
- }
1280
- }
1281
- } else if (doc?.shared_from_uid && (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1276
+ // default:
1277
+ // ret = `xu-pattern.png`;
1278
+ // break;
1279
+ // }
1280
+ // }
1281
+ // } else
1282
+
1283
+ if (doc?.shared_from_uid) {
1284
+ //&& (doc.pending || (doc.team_req_id && doc.contact_share_copy))) {
1282
1285
  // pending or active share request
1283
1286
  const shared_from_uid_ret = await get_account_name({ uid_query: doc.shared_from_uid });
1284
1287
  ret = shared_from_uid_ret.data.profile_avatar;
@@ -2452,7 +2455,7 @@ export const create_account_profile = async function (req, job_id, headers) {
2452
2455
 
2453
2456
  const d = Date.now();
2454
2457
  const doc = {
2455
- _id: await _common.xuda_get_uuid('contact_profile'),
2458
+ _id: await _common.xuda_get_uuid('account_profile'),
2456
2459
  stat: 3,
2457
2460
  date_created_ts: d,
2458
2461
  ts: d,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1129",
3
+ "version": "1.2.1131",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {