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

fix: return full response w/ adaptiveCard invoke action #3778

Merged
merged 3 commits into from
Jun 18, 2021

Conversation

mdrichardson
Copy link
Contributor

Fixes #3776

@mdrichardson mdrichardson requested a review from a team as a code owner June 18, 2021 20:59
return { status: response.statusCode, body: response.value };
return { status: response.statusCode, body: response };
Copy link
Contributor Author

@mdrichardson mdrichardson Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is part that actually addresses the issue. Made to match .NET:

image
image

Comment on lines +708 to +717
if (value.action.type !== 'Action.Execute') {
const response = this.createAdaptiveCardInvokeErrorResponse(
StatusCodes.BAD_REQUEST,
'NotSupported',
`The action '${value.action.type}' is not supported.`
);

throw new InvokeException(StatusCodes.BAD_REQUEST, response);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This was just to sync w/ .NET

@mdrichardson mdrichardson changed the title return full response w/ adaptiveCard invoke action fix: return full response w/ adaptiveCard invoke action Jun 18, 2021
@coveralls
Copy link

coveralls commented Jun 18, 2021

Pull Request Test Coverage Report for Build 951300841

  • 3 of 5 (60.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 85.411%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botbuilder-core/src/activityHandler.ts 3 5 60.0%
Totals Coverage Status
Change from base Build 951172343: -0.01%
Covered Lines: 19297
Relevant Lines: 21493

💛 - Coveralls

Copy link
Contributor

@joshgummersall joshgummersall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small question, otherwise LGTM.

@mdrichardson mdrichardson merged commit f57a6da into microsoft:main Jun 18, 2021
@mdrichardson mdrichardson deleted the adaptiveInvokeFix branch June 18, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adaptive Card Invoke Activity should return the response instead of response value
3 participants