Skip to content

Commit

Permalink
Minor changes to botAgent and revert misc eslint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurnford committed Jun 21, 2019
1 parent fea74c7 commit f17466c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `*`: Added [`eslint`](https://npmjs.com/package/eslint/) to static code analysis, by [@compulim](https://github.com/compulim), in PR [#1970](https://github.com/microsoft/BotFramework-WebChat/pull/1970)
- Added pt-PT language, by [@bodyzatva](https://github.com/bodyzatva) in PR [#2005](https://github.com/microsoft/BotFramework-WebChat/pull/2005) and PR [#2020](https://github.com/Microsoft/BotFramework-WebChat/pull/2020)
- Added documentation for using Web Chat dev build, by [@corinagum](https://github.com/corinagum), in PR [#2074](https://github.com/Microsoft/BotFramework-WebChat/pull/2074)
- Added the Web Chat version to DirectLine's botAgent option, by [@tdurnford](https://github.com/tdurnford), in PR [#2101](https://github.com/Microsoft/BotFramework-WebChat/pull/2101)

### Changed

Expand Down
2 changes: 0 additions & 2 deletions packages/bundle/src/FullReactWebChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@ class FullReactWebChat extends React.Component {
FullReactWebChat.defaultProps = {
adaptiveCardHostConfig: undefined,
attachmentMiddleware: undefined,
renderMarkdown: undefined,
styleOptions: undefined,
styleSet: undefined
};

FullReactWebChat.propTypes = {
adaptiveCardHostConfig: PropTypes.any,
attachmentMiddleware: PropTypes.func,
renderMarkdown: PropTypes.func,
styleOptions: PropTypes.any,
styleSet: PropTypes.any
};
Expand Down
2 changes: 1 addition & 1 deletion packages/bundle/src/createDirectLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function createDirectLine({
webSocket
}) {
return new DirectLine({
botAgent,
conversationId,
domain,
fetch,
Expand All @@ -22,7 +23,6 @@ export default function createDirectLine({
token,
watermark,
webSocket,
botAgent,
createFormData: attachments => {
const formData = new FormData();

Expand Down
4 changes: 2 additions & 2 deletions packages/bundle/src/index-es5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import 'core-js/modules/es6.symbol';
import 'core-js/modules/es7.array.includes';
import 'url-search-params-polyfill';
import 'whatwg-fetch';
import { version } from './index-minimal';
import addVersion from './addVersion';
import defaultCreateDirectLine from './createDirectLine';
import { version } from './index-minimal';

const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat-es5/${version}`, ...options });
const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat/${version} (ES5)`, ...options });

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

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

export default ReactWebChat;

Expand Down
4 changes: 2 additions & 2 deletions packages/bundle/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

export * from './index-minimal';

import addVersion from './addVersion';
import { version } from './index-minimal';
import addVersion from './addVersion';
import coreRenderWebChat from './renderWebChat';
import createCognitiveServicesBingSpeechPonyfillFactory from './createCognitiveServicesBingSpeechPonyfillFactory';
import createCognitiveServicesSpeechServicesPonyfillFactory from './createCognitiveServicesSpeechServicesPonyfillFactory';
Expand All @@ -15,7 +15,7 @@ import renderMarkdown from './renderMarkdown';

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

const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat/${version}`, ...options });
const createDirectLine = options => defaultCreateDirectLine({ botAgent: `webchat/${version} (Full)`, ...options });

export default ReactWebChat;

Expand Down
2 changes: 0 additions & 2 deletions packages/component/src/Localization/tr-TR.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint no-magic-numbers: ["error", { "ignore": [1, 5, 24, 48, 60000, 3600000] }] */

function xMinutesAgo(dateStr) {
const date = new Date(dateStr);
const dateTime = date.getTime();
Expand Down

0 comments on commit f17466c

Please sign in to comment.