Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle change to middleware #2177

Merged
merged 3 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## v4.10.0 - 2020 - 08 - 18
## Added
- [client] Added a log panel entry at the start of a conversation that displays the bot endpoint in PR [2149](https://github.com/microsoft/BotFramework-Emulator/pull/2149)
- [client] - Bumped `botframework-webchat` to v4.10.0 in PR [2142](https://github.com/microsoft/BotFramework-Emulator/pull/2142)
- [client] - Bumped `botframework-webchat` to v4.10.0 in PR [2177](https://github.com/microsoft/BotFramework-Emulator/pull/2177)

## Fixed
- [client] Added missing content to signed in view of Cosmos DB service dialog and fixed product page link in PR [2150](https://github.com/microsoft/BotFramework-Emulator/pull/2150)
- [docs] Modified CONTRIBUTING.md to include updated information about global dependencies required to build from source in PR [2153](https://github.com/microsoft/BotFramework-Emulator/pull/2153)
- [client] Fixed a bug where trying to open the sign-in link on an OAuth card would open the file explorer if ngrok was not configured in PR [2155](https://github.com/microsoft/BotFramework-Emulator/pull/2155)
- [client] Change to a warning message in inspector when clicking on LUIS trace [2160](https://github.com/microsoft/BotFramework-Emulator/pull/2160)
- [client] Handle result from webchat middleware gracefully [2177](https://github.com/microsoft/BotFramework-Emulator/pull/2177)

## v4.9.0 - 2020 - 05 - 11
## Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
//

import { ValueTypes, RestartConversationStatus } from '@bfemulator/app-shared';
import { User } from '@bfemulator/sdk-shared';
import { Activity, ActivityTypes } from 'botframework-schema';
import ReactWebChat, { createStyleSet } from 'botframework-webchat';
import * as React from 'react';
Expand Down Expand Up @@ -139,6 +138,11 @@ export class Chat extends PureComponent<ChatProps, ChatState> {
}

private activityWrapper(next, card, children): ReactNode {
let childrenContents = null;
const middlewareResult = next(card);
if (middlewareResult) {
childrenContents = middlewareResult(children);
}
return (
<OuterActivityWrapperContainer
card={card}
Expand All @@ -147,7 +151,7 @@ export class Chat extends PureComponent<ChatProps, ChatState> {
onItemRendererClick={this.onItemRendererClick}
onItemRendererKeyDown={this.onItemRendererKeyDown}
>
{next(card)(children)}
{childrenContents}
</OuterActivityWrapperContainer>
);
}
Expand Down