Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Conversation

@rido-min
Copy link
Member

fixes https://github.com/microsoft/botbuilder-dotnet/issues/6905

This pull request introduces a new method for retrieving a single conversation member by user ID and conversation ID, and updates existing code to use this new method instead of casting to a concrete type. This improves code clarity and maintainability by leveraging an interface extension method and updating interface definitions accordingly.

API and Interface Enhancements:

  • Added GetConversationMemberWithHttpMessagesAsync to the IConversations interface, enabling retrieval of a single conversation member by user ID and conversation ID.
  • Implemented the corresponding method stub in MemoryConversations for test coverage.

Extension Method Addition:

  • Introduced the GetConversationMemberAsync extension method for IConversations, which wraps the new interface method and returns a ChannelAccount.

Refactoring to Use the New Method:

  • Updated SkillHandlerImpl.cs and TeamsInfo.cs to use the new GetConversationMemberAsync extension method, removing the need for casting to the concrete Conversations type. [1] [2]

…lementations (#15)

* Initial plan

* Add GetConversationMemberAsync to IConversations and remove casts to concrete Conversations class

Co-authored-by: rido-min <[email protected]>

* Fix documentation for GetConversationMemberAsync extension method

Co-authored-by: rido-min <[email protected]>

* Fix documentation for both GetConversationMemberAsync overloads

Co-authored-by: rido-min <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: rido-min <[email protected]>
cleemullins
cleemullins previously approved these changes Dec 17, 2025
@tracyboehrer tracyboehrer dismissed cleemullins’s stale review December 30, 2025 18:41

Pending Matt approval

@tracyboehrer tracyboehrer requested review from MattB-msft and removed request for cleemullins December 30, 2025 18:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect cast when retrieving the Conversations client from turnContext DI

3 participants