@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.
@@ -13949,7 +13949,7 @@ const client = new BrowserClient({
13949
13949
  return event;
13950
13950
  },
13951
13951
  environment: "production",
13952
- release: "1.7.26-06c760b",
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}/${"06c760b"}/index.html`;
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.26",
15702
+ version: "1.7.27",
15703
15703
  isNpm: true,
15704
- commitHash: "06c760b"
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
- if (sanitizedAdaBotHandleOverride !== adaBotHandleOverride) {
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: "06c760b".slice(0, 7),
16751
+ embedVersion: "571929b".slice(0, 7),
16748
16752
  greeting,
16749
16753
  language,
16750
16754
  skipGreeting,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.7.26",
3
+ "version": "1.7.27",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index-npm.d.ts",