-
Notifications
You must be signed in to change notification settings - Fork 286
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
Ensure Connector Client is retrieved in teams_info.py #2062
Ensure Connector Client is retrieved in teams_info.py #2062
Conversation
@microsoft-github-policy-service agree |
@@ -318,10 +318,18 @@ def get_team_id(turn_context: TurnContext): | |||
|
|||
@staticmethod | |||
async def _get_connector_client(turn_context: TurnContext) -> ConnectorClient: | |||
return await turn_context.adapter.create_connector_client( | |||
turn_context.activity.service_url | |||
if hasattr(turn_context.adapter, 'create_connector_client'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced this is required. JS appears to take some streaming concerns into mind. Does this work with just getting the ConnectorClient from TurnState as DotNet does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Indeed it does work with just getting the ConnectClient from TurnState.
Though, I encountered a failure in the test_on_teams_members_added_activity test case. To fix it, I implemented a mock ConnectorClient using the SimpleAdapter. What do you think?
Fixes #2061