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

Corrected GetConversationMembers to use TeamsInfo helper class rather… #5874

Merged
merged 3 commits into from
Sep 3, 2021

Conversation

LeeParrishMSFT
Copy link
Contributor

… than rely on BotFrameworkAdapter directly.

Fixes #5873

Description

Corrected GetConversationMembers in Adaptive.Runtime to use TeamsInfo helper class rather than rely on BotFrameworkAdapter functions that aren't available now that CoreBotAdapter derives from CloudAdapter and not BotFrameworkAdapter

Specific Changes

Remove check for BotFrameworkAdapter and call to it for GetConversationMembersAsync and now use TeamsInfo and call GetMembersAsync.

Testing

Tested against a Composer created bot using the updated SDK to make sure all the changes were correct.

@coveralls
Copy link
Collaborator

coveralls commented Sep 2, 2021

Pull Request Test Coverage Report for Build 266877

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 35 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.05%) to 75.755%

Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder.LanguageGeneration/Analyzer.cs 3 96.47%
/libraries/Microsoft.Bot.Builder.LanguageGeneration/Templates.cs 7 95.88%
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/GetConversationMembers.cs 12 36.36%
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/GetActivityMembers.cs 13 40.63%
Totals Coverage Status
Change from base Build 266218: -0.05%
Covered Lines: 23165
Relevant Lines: 30579

💛 - Coveralls

@LeeParrishMSFT LeeParrishMSFT marked this pull request as draft September 2, 2021 19:01
@LeeParrishMSFT LeeParrishMSFT removed the request for review from Stevenic September 2, 2021 21:54
@LeeParrishMSFT LeeParrishMSFT marked this pull request as ready for review September 2, 2021 21:54
@@ -95,5 +93,21 @@ protected override string OnComputeId()
{
return $"{GetType().Name}[{this.Property?.ToString() ?? string.Empty}]";
}

private static async Task<IEnumerable<ChannelAccount>> GetMembersAsync(IConnectorClient connectorClient, string conversationId, CancellationToken cancellationToken)
Copy link
Contributor

@mrivera-ms mrivera-ms Sep 2, 2021

Choose a reason for hiding this comment

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

IConnectorClient connectorClient, string conversationId

Can we pass ITurnContext here instead of connectorClient and conversationId? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I've pushed a change to simplify this area of the code. Thanks for the suggestion.

Copy link
Contributor

@mrivera-ms mrivera-ms left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

Exception thrown when calling GetConversationMembers
5 participants