From e0b9ad6d820f0af8fdf0907dd43d04b8914a0ccf Mon Sep 17 00:00:00 2001 From: William Wong Date: Thu, 4 Mar 2021 12:17:18 -0800 Subject: [PATCH] Remove replyToId for Direct Line Speech adapter (#3776) * Remove replyToId for Direct Line Speech adapter * Update entry --- CHANGELOG.md | 4 ++ .../html/chatAdapter.directLineSpeech.html | 40 +++++++++++++++++++ .../html/chatAdapter.directLineSpeech.js | 7 ++++ docs/DIRECT_LINE_SPEECH.md | 6 --- .../directlinespeech/src/DirectLineSpeech.js | 2 + 5 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 __tests__/html/chatAdapter.directLineSpeech.html create mode 100644 __tests__/html/chatAdapter.directLineSpeech.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a4230d0ffd..4c7f793612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Fixes [#3773](https://github.com/microsoft/BotFramework-WebChat/issues/3773). Remove `replyToId` when using Direct Line Speech adapter, by [@compulim](https://github.com/compulim) in PR [#3776](https://github.com/microsoft/BotFramework-WebChat/pull/3776) + ### Samples - Fixes [#3632](https://github.com/microsoft/BotFramework-WebChat/issues/3632). Update reaction button sample : Add replyToId to the postActivity object, by [@amal-khalaf](https://github.com/amal-khalaf) in PR [#3769](https://github.com/microsoft/BotFramework-WebChat/pull/3769) diff --git a/__tests__/html/chatAdapter.directLineSpeech.html b/__tests__/html/chatAdapter.directLineSpeech.html new file mode 100644 index 0000000000..d8f095f43b --- /dev/null +++ b/__tests__/html/chatAdapter.directLineSpeech.html @@ -0,0 +1,40 @@ + + + + + + + +
+ + + diff --git a/__tests__/html/chatAdapter.directLineSpeech.js b/__tests__/html/chatAdapter.directLineSpeech.js new file mode 100644 index 0000000000..87707a183d --- /dev/null +++ b/__tests__/html/chatAdapter.directLineSpeech.js @@ -0,0 +1,7 @@ +/** + * @jest-environment ./__tests__/html/__jest__/WebChatEnvironment.js + */ + +describe('Direct Line Speech chat adapter', () => { + test('should connect to the MockBot.', () => runHTMLTest('chatAdapter.directLineSpeech.html')); +}); diff --git a/docs/DIRECT_LINE_SPEECH.md b/docs/DIRECT_LINE_SPEECH.md index 0ab1054670..d94b12fce6 100644 --- a/docs/DIRECT_LINE_SPEECH.md +++ b/docs/DIRECT_LINE_SPEECH.md @@ -482,12 +482,6 @@ You can only specify speech recognition language at initialization time. You can [Proactive message](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-proactive-message?view=azure-bot-service-4.0&tabs=csharp) is not supported when using Direct Line Speech. -### Emulator is not supported - -> Please vote on [this bug](https://github.com/microsoft/BotFramework-WebChat/issues/2683) if this behavior is not desirable. - -Currently, Emulator only support Direct Line protocol. We are planning to add Direct Line Speech protocol to Emulator. - ### Abort recognition is not supported > Please vote on [this bug](https://github.com/microsoft/BotFramework-WebChat/issues/2664) if this behavior is not desirable. diff --git a/packages/directlinespeech/src/DirectLineSpeech.js b/packages/directlinespeech/src/DirectLineSpeech.js index 00da31ab29..d01bc0ad0e 100644 --- a/packages/directlinespeech/src/DirectLineSpeech.js +++ b/packages/directlinespeech/src/DirectLineSpeech.js @@ -56,6 +56,8 @@ export default class DirectLineSpeech { // Since DLSpeech service never ACK our outgoing activity, this activity must be from bot. role: 'bot' }, + // Since DLSpeech never ACK our outgoing activity, the "replyToId" will rarely able to point to an existing activity. + replyToId: undefined, // Direct Line Speech server currently do not timestamp outgoing activities. // Thus, it will be easier to just re-timestamp every incoming/outgoing activities using local time. timestamp: new Date().toISOString()