Restart porting ApiClient from 2.0#432
Merged
Conversation
rido-min
commented
Apr 17, 2026
| }); | ||
| ``` | ||
|
|
||
| **Do NOT use `ctx.TeamsBotApplication.Api.Conversations`** — that is the unscoped base client and will throw `NullReferenceException`. |
Member
Author
There was a problem hiding this comment.
@MehakBindra we should talk about this, let's chat next week
Resolves conflicts by keeping Compat decoupled from TeamsBotApplication/Apps (per PR #391). Removes duplicate CompatChannelAccount.cs (methods now in CompatActivity.cs). Updates CompatAdapterTests to use BotApplication. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GetTeamChannelsAsync returns ConversationList, not IList<ChannelInfo>. Update tests to use the correct type and access .Conversations property. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rajan-chari
approved these changes
Apr 22, 2026
Contributor
rajan-chari
left a comment
There was a problem hiding this comment.
Approaching the 2.1 FrontEnd from a compat pov. Thanks Rido.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes significant improvements to the documentation and API mapping for the Teams Bot compatibility layer, focusing on clarifying the design and usage of the new
ApiClientabstraction and updating the mapping for Teams and batch APIs. The changes include a comprehensive design document forApiClient, a major rewrite of the CompatTeamsInfo API mapping, and updates to deprecated warnings and method routing. These updates provide clearer guidance for migrating to the new architecture and highlight areas needing further work.ApiClient Design and Usage Documentation:
ApiClient-Design.mddocument describing the architecture, sub-client structure, DI patterns, scoping viaForServiceUrl, and delegation to core SDK clients. Includes diagrams, method mapping tables, and integration details for handler and compat layers.CompatTeamsInfo API Mapping Updates:
CompatTeamsInfo-API-Mapping.mdto:ApiClientsub-clients for meetings and teams, and identify methods still requiring a newBatchClient.Deprecation and Method Routing:
Testing and References:
Project File Maintenance:
core.slnxsolution file to remove theIdattribute from theMicrosoft.Teams.Bot.Compat.csprojentry, likely for consistency or tooling compatibility.