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: adjust adaptiveCard/action handling #3729

Merged
merged 6 commits into from
Jun 9, 2021

Conversation

mdrichardson
Copy link
Contributor

#minor

Description

Per the OBI, AdaptiveCardInvokeValue.authentication should actually be a TokenExchangeInvokeRequest, which has the same properties as AdaptiveCardAuthentication, which is now superfluous.

In working on this, I also noticed that this PR was actually already covered.

Specific Changes

  • Remove AdaptiveCardAuthentication and replace with TokenExchangeInvokeRequest
  • Revert this PR (manually, because I didn't realize I should've just called git revert until I had already manually removed it.
  • Added tests

@@ -133,9 +133,6 @@ export class TeamsActivityHandler extends ActivityHandler {
await this.handleTeamsTabSubmit(context, context.activity.value)
);

case 'adaptiveCard/action':
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: Everything removed in this file and related tests is already covered on new line 138, when the default of the switch/case calls super.onInvokeActivity()

@coveralls
Copy link

coveralls commented Jun 7, 2021

Pull Request Test Coverage Report for Build 922719961

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 85.388%

Files with Coverage Reduction New Missed Lines %
libraries/botbuilder/src/teamsActivityHandler.ts 1 99.57%
Totals Coverage Status
Change from base Build 916729255: 0.04%
Covered Lines: 19244
Relevant Lines: 21436

💛 - Coveralls

@mdrichardson mdrichardson marked this pull request as ready for review June 7, 2021 21:13
@mdrichardson mdrichardson requested a review from a team as a code owner June 7, 2021 21:13
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.

@mdrichardson was the initial PR that introduced this functionality necessary in the first place? It seems like the handling code already existed.

@mdrichardson
Copy link
Contributor Author

mdrichardson commented Jun 7, 2021

I don't believe it was necessary, since yes, since it was handled more broadly (ActivityHandler vs TeamsActivityHandler) here

@joshgummersall
Copy link
Contributor

@cfe84, if you have a moment, did you try to leverage the action in question before submitting #3716?

@mdrichardson mdrichardson merged commit a8731af into microsoft:main Jun 9, 2021
@mdrichardson mdrichardson deleted the actionExecute branch June 9, 2021 20:50
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.

3 participants