@botfabrik/engine-webclient 4.99.12-alpha.1 → 4.100.0
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/dist/index.js +11 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -52,11 +52,19 @@ exports.default = (clientName, environment, props) => async (bot) => {
|
|
|
52
52
|
});
|
|
53
53
|
// serve embed resources
|
|
54
54
|
bot.webserver.express.get(`/${clientName}/embed`, (req, res) => {
|
|
55
|
-
const lang = req.query['lang'] || undefined;
|
|
56
55
|
const server = `${bot.webserver.baseUrl}/${clientName}`;
|
|
57
|
-
const
|
|
56
|
+
const serverUrl = new URL(server);
|
|
57
|
+
// Pass all query parameters to the chatbot URL
|
|
58
|
+
for (const [key, value] of Object.entries(req.query)) {
|
|
59
|
+
if (Array.isArray(value)) {
|
|
60
|
+
value.forEach((v) => serverUrl.searchParams.append(key, String(v)));
|
|
61
|
+
}
|
|
62
|
+
else if (value !== undefined) {
|
|
63
|
+
serverUrl.searchParams.append(key, String(value));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
58
66
|
res.set('Content-Type', 'text/html; charset=utf-8');
|
|
59
|
-
res.write((0, views_1.default)(
|
|
67
|
+
res.write((0, views_1.default)(serverUrl.toString(), `${server}/embed/bundle.js`));
|
|
60
68
|
res.end();
|
|
61
69
|
});
|
|
62
70
|
if (!isFabVisible(props)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.100.0",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@botfabrik/engine-domain": "^4.99.10",
|
|
24
|
-
"@botfabrik/engine-transcript-export": "^4.
|
|
24
|
+
"@botfabrik/engine-transcript-export": "^4.100.0",
|
|
25
25
|
"@botfabrik/engine-utils": "^4.99.10",
|
|
26
26
|
"@google-cloud/speech": "^7.2.0",
|
|
27
27
|
"@node-saml/passport-saml": "^5.1.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"tsx": "^4.20.5",
|
|
44
44
|
"typescript": "5.9.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "40d4086b7addbe92372d6f8454ca8ac42be2b450"
|
|
47
47
|
}
|