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

Add default middleware to patch location of tenantId for MS Teams #886

Merged
merged 6 commits into from
Apr 23, 2019

Conversation

benbrown
Copy link
Contributor

Fixes #884

Description

This change handles the in-transition locaiton of the tenant ID field for MS Teams.

Specific Changes

Load a middleware in the constructor for BotFrameworkAdapter that will look for channelData.tenant.id and copy the value to conversation.tenantId for use in createConversation.

Testing

  • Unit tests have been updated
  • Connect a bot to MS Teams, then use adapter.createConversation to create a DM with a user.

@benbrown
Copy link
Contributor Author

NOTE: I fixed this with a middleware because it seemed like this was the LEAST disruptive place to put code that will only be needed until the protocol change happens.

The other possible place to do this would be inside processActivity, which seemed less good.

@coveralls
Copy link

coveralls commented Apr 22, 2019

Pull Request Test Coverage Report for Build #2212

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 88.276%

Files with Coverage Reduction New Missed Lines %
libraries/botframework-config/src/botConfigurationBase.ts 2 85.59%
Totals Coverage Status
Change from base Build #2206: -0.01%
Covered Lines: 3241
Relevant Lines: 3528

💛 - Coveralls

tomlm
tomlm previously requested changes Apr 23, 2019
Copy link
Contributor

@tomlm tomlm left a comment

Choose a reason for hiding this comment

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

🕐

@cleemullins cleemullins dismissed tomlm’s stale review April 23, 2019 22:36

All of Tom's feedback is taken, and he's busy - so I'm dismissing to Ben can merge once the build is passing.

Copy link
Contributor

@tomlm tomlm left a comment

Choose a reason for hiding this comment

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

:shipit:

@cleemullins cleemullins merged commit 0bbcf03 into master Apr 23, 2019
@cleemullins cleemullins deleted the benbrown/884 branch April 23, 2019 22:44
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.

MS Teams tenant ID location needs mapping in BotFrameworkAdapter.createConversation
5 participants