@botfabrik/engine-webclient 4.90.1 → 4.90.2

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.
@@ -15,11 +15,11 @@ const createSessionInfoBase = async (userId, querystrings, headers, clientName,
15
15
  const firstName = querystrings['userFirstName'];
16
16
  const lastName = querystrings['userLastName'];
17
17
  const email = querystrings['userEmail'];
18
- const displayName = firstName && lastName ? `${firstName} ${lastName}` : 'Webseiten Besucher';
18
+ const displayName = firstName && lastName ? `${firstName} ${lastName}` : undefined;
19
19
  let user = {
20
20
  ...sessionInfo.user,
21
21
  id: userId,
22
- displayName,
22
+ ...(displayName ? { displayName } : {}),
23
23
  ...(firstName ? { firstName } : {}),
24
24
  ...(lastName ? { lastName } : {}),
25
25
  ...(email ? { email } : {}),
@@ -38,7 +38,7 @@ const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
38
38
  referrer: '',
39
39
  },
40
40
  },
41
- user: { id: 'my-user-id', displayName: 'my user', payload: {} },
41
+ user: { id: 'my-user-id', payload: {} },
42
42
  contexts: [],
43
43
  environment: 'PROD',
44
44
  };
@@ -50,7 +50,7 @@ const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
50
50
  (0, globals_1.expect)(sessionInfo.client.payload.querystrings.email).toBe('hans@example.com');
51
51
  // user
52
52
  (0, globals_1.expect)(sessionInfo.user.id).toBe('my-user-id');
53
- (0, globals_1.expect)(sessionInfo.user.displayName).toBe('Webseiten Besucher');
53
+ (0, globals_1.expect)(sessionInfo.user.displayName).not.toBeDefined();
54
54
  (0, globals_1.expect)(sessionInfo.user.locale).toBe('de_DE');
55
55
  (0, globals_1.expect)(sessionInfo.user.payload).toStrictEqual({});
56
56
  });
@@ -87,7 +87,7 @@ const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
87
87
  };
88
88
  const sessionInfo = await (0, createSessionInfo_1.default)(socket, 'my-client', 'TEST', defaultSessionInfo, 'my-user-id', 'de_DE', {}, props)();
89
89
  (0, globals_1.expect)(sessionInfo.user.id).toBe('my-user-id');
90
- (0, globals_1.expect)(sessionInfo.user.displayName).toBe('Webseiten Besucher');
90
+ (0, globals_1.expect)(sessionInfo.user.displayName).not.toBeDefined();
91
91
  (0, globals_1.expect)(sessionInfo.user.locale).toBe('de_DE');
92
92
  (0, globals_1.expect)(sessionInfo.user.payload).toStrictEqual({});
93
93
  (0, globals_1.expect)(sessionInfo.environment).toBe('TEST');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.90.1",
3
+ "version": "4.90.2",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,5 +39,5 @@
39
39
  "tsx": "^4.19.4",
40
40
  "typescript": "5.8.3"
41
41
  },
42
- "gitHead": "703739c3a690e2e5ad2cce64b099c217a3198b67"
42
+ "gitHead": "25a36bc168afa696dcce52b58203cec80cb1a1cf"
43
43
  }