Skip to content

Commit

Permalink
Added warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurnford committed Jun 24, 2019
2 parents abda6a3 + aef834b commit 91210f2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix [#1627](https://github.com/Microsoft/BotFramework-WebChat/issues/1627). Fixed timestamps randomly stopped from updating, by [@compulim](https://github.com/compulim) in PR [#2090](https://github.com/Microsoft/BotFramework-WebChat/pull/2090)
- Fix [#2001](https://github.com/Microsoft/BotFramework-WebChat/issues/2001). Strip Markdown from ARIA labels, so screen readers do not speak Markdown in text, by [@corinagum](https://github.com/corinagum) in PR [#2096](https://github.com/Microsoft/BotFramework-WebChat/pull/2096)
- Fix [#1926](https://github.com/microsoft/BotFramework-WebChat/issues/1926). Fixed scroll stickiness issue when submitting an Adaptive Card form with suggested actions opened, by [@compulim](https://github.com/compulim) in PR [#2107](https://github.com/microsoft/BotFramework-WebChat/pull/2107)
- Fix [#2106](https://github.com/Microsoft/BotFramework-WebChat/issues/2016). Fix AdaptiveCardHostConfig warning associated with the CommonCard component, by [@tdurnford](https://github.com/tdurnford) in PR [#2108](https://github.com/Microsoft/BotFramework-WebChat/pull/2108)
- Fix [#2110](https://github.com/Microsoft/BotFramework-WebChat/issues/2110). Fixed sendBox input/textarea background color issue, by [@tdurnford](https://github.com/johndoe) in PR [#2111](https://github.com/Microsoft/BotFramework-WebChat/pull/2111)
- Fix [#2104](https://github.com/Microsoft/BotFramework-WebChat/issues/2104). Remove deprecated `/master/webchat**.js links from samples, by [@corinagum](https://github.com/corinagum) in PR [#2105](https://github.com/Microsoft/BotFramework-WebChat/pull/2105)
- Fix [#2106](https://github.com/Microsoft/BotFramework-WebChat/issues/2016). Fix AdaptiveCardHostConfig warning associated with the CommonCard component, by [@tdurnford](https://github.com/tdurnford) in PR [#2108](https://github.com/Microsoft/BotFramework-WebChat/pull/2108)

### Samples

Expand Down
9 changes: 8 additions & 1 deletion packages/bundle/src/index-es5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Polyfills for IE11 and other ES5 browsers
// To maintain quality, we prefer polyfills without additives
// For example, we prefer Promise implementation from "core-js" than "bluebird"

import 'core-js/modules/es6.array.find-index';
import 'core-js/modules/es6.array.find';
import 'core-js/modules/es6.array.iterator';
Expand All @@ -20,7 +21,13 @@ import { version } from './index-minimal';
import addVersion from './addVersion';
import defaultCreateDirectLine from './createDirectLine';

const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat/${version} (ES5)`, ...options });
const createDirectLine = options => {
options.botAgent &&
console.warn(
'Web Chat: Developers are not currently allowed to set botAgent in the createDirectLine function. See https://github.com/microsoft/BotFramework-WebChat/issues/2119 for more details.'
);
return defaultCreateDirectLine({ ...options, botAgent: `webchat/${version} (ES5)` });
};

window['WebChat'] = {
...window['WebChat'],
Expand Down
9 changes: 8 additions & 1 deletion packages/bundle/src/index-minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ import createBrowserWebSpeechPonyfillFactory from './createBrowserWebSpeechPonyf
import defaultCreateDirectLine from './createDirectLine';

const renderWebChat = coreRenderWebChat.bind(null, ReactWebChat);
const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat/${version} (Minimal)`, ...options });

const createDirectLine = options => {
options.botAgent &&
console.warn(
'Web Chat: Developers are not currently allowed to set botAgent in the createDirectLine function. See https://github.com/microsoft/BotFramework-WebChat/issues/2119 for more details.'
);
return defaultCreateDirectLine({ ...options, botAgent: `webchat/${version} (Minimal)` });
};

export default ReactWebChat;

Expand Down
8 changes: 7 additions & 1 deletion packages/bundle/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ import renderMarkdown from './renderMarkdown';

const renderWebChat = coreRenderWebChat.bind(null, ReactWebChat);

const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat/${version} (Full)`, ...options });
const createDirectLine = options => {
options.botAgent &&
console.warn(
'Web Chat: Developers are not currently allowed to set botAgent. See https://github.com/microsoft/BotFramework-WebChat/issues/2119 for more details.'
);
return defaultCreateDirectLine({ ...options, botAgent: `webchat/${version} (Full)` });
};

export default ReactWebChat;

Expand Down

0 comments on commit 91210f2

Please sign in to comment.