@ada-support/embed2 1.7.26 → 1.7.27
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/npm-entry/index.js +10 -6
- package/package.json +1 -1
package/dist/npm-entry/index.js
CHANGED
|
@@ -13949,7 +13949,7 @@ const client = new BrowserClient({
|
|
|
13949
13949
|
return event;
|
|
13950
13950
|
},
|
|
13951
13951
|
environment: "production",
|
|
13952
|
-
release: "1.7.
|
|
13952
|
+
release: "1.7.27-571929b",
|
|
13953
13953
|
sampleRate: 0.25,
|
|
13954
13954
|
autoSessionTracking: false,
|
|
13955
13955
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -14521,7 +14521,7 @@ function getEmbedURL(_ref) {
|
|
|
14521
14521
|
} else {
|
|
14522
14522
|
host = `http://${handle}.localhost:9001`;
|
|
14523
14523
|
}
|
|
14524
|
-
return `${host}/embed/${frameName}/${"
|
|
14524
|
+
return `${host}/embed/${frameName}/${"571929b"}/index.html`;
|
|
14525
14525
|
}
|
|
14526
14526
|
function constructQueryString(query) {
|
|
14527
14527
|
return Object.keys(query).map(key => {
|
|
@@ -15699,9 +15699,9 @@ async function log(message, extra, options) {
|
|
|
15699
15699
|
service: "embed",
|
|
15700
15700
|
env: "production",
|
|
15701
15701
|
embedVersion: 2,
|
|
15702
|
-
version: "1.7.
|
|
15702
|
+
version: "1.7.27",
|
|
15703
15703
|
isNpm: true,
|
|
15704
|
-
commitHash: "
|
|
15704
|
+
commitHash: "571929b"
|
|
15705
15705
|
}))
|
|
15706
15706
|
});
|
|
15707
15707
|
}
|
|
@@ -15875,8 +15875,12 @@ async function fetchClientUsingAlternativeBotRollout(primaryBotClientObject, alt
|
|
|
15875
15875
|
language
|
|
15876
15876
|
} = adaSettings;
|
|
15877
15877
|
if (adaBotHandleOverride) {
|
|
15878
|
+
var _primaryBotClientObje;
|
|
15878
15879
|
const sanitizedAdaBotHandleOverride = escapeUrlParam(adaBotHandleOverride);
|
|
15879
|
-
|
|
15880
|
+
|
|
15881
|
+
// Only allow overriding to primary or alternative bot
|
|
15882
|
+
const isAllowedBot = sanitizedAdaBotHandleOverride === primaryBotClientObject.handle || sanitizedAdaBotHandleOverride === ((_primaryBotClientObje = primaryBotClientObject.alternative_bot) === null || _primaryBotClientObje === void 0 ? void 0 : _primaryBotClientObje.handle);
|
|
15883
|
+
if (!isAllowedBot) {
|
|
15880
15884
|
return primaryBotClientObject;
|
|
15881
15885
|
}
|
|
15882
15886
|
const overrideBotClientObject = await fetchClient(sanitizedAdaBotHandleOverride, cluster, domain, language || get_browser_language());
|
|
@@ -16744,7 +16748,7 @@ class ChatFrame extends d {
|
|
|
16744
16748
|
const hostPageUrlParams = new URL(window.location.href).searchParams;
|
|
16745
16749
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
16746
16750
|
const queryParams = {
|
|
16747
|
-
embedVersion: "
|
|
16751
|
+
embedVersion: "571929b".slice(0, 7),
|
|
16748
16752
|
greeting,
|
|
16749
16753
|
language,
|
|
16750
16754
|
skipGreeting,
|