Open
Conversation
Replaced all usage of Microsoft.Teams.Bot.Apps with Microsoft.Teams.Bot.Core, including updating dependency injection, using statements, and type references (e.g., TeamsBotApplication → BotApplication). Commented out or replaced App-specific TeamsInfo, meeting, and batch messaging APIs with Core-based or direct HTTP implementations. Updated project references and internal visibility accordingly. EchoBot and related adapters now use Core types, and group conversation handling includes additional debug output. This migration simplifies dependencies and prepares the codebase for future extensibility.
Replaced all usage of Microsoft.Teams.Bot.Apps with Microsoft.Teams.Bot.Core, including updating dependency injection, using statements, and type references (e.g., TeamsBotApplication → BotApplication). Commented out or replaced App-specific TeamsInfo, meeting, and batch messaging APIs with Core-based or direct HTTP implementations. Updated project references and internal visibility accordingly. EchoBot and related adapters now use Core types, and group conversation handling includes additional debug output. This migration simplifies dependencies and prepares the codebase for future extensibility.
Reformat SuggestedActions construction for clarity in help handler, reorder using directives for consistency, fix minor formatting in EchoBot.cs, and add MessageActivity_WithSuggestedActions unit test.
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 PR removes the dependency from Compat to TeamsApps, so we can decouple the release date of Core/Compat from PA, from the FE release.
This pull request primarily migrates code from using the legacy
TeamsBotApplicationand related types in theMicrosoft.Teams.Bot.Appsnamespace to the newerBotApplicationand types fromMicrosoft.Teams.Bot.Core. It also removes or updates compatibility methods that referenced the old schema, and modernizes dependency registration and usage throughout the codebase. Additionally, there are improvements to the handling of Teams channel account conversions and group conversation logic in the sample bots.Migration to Bot Core and Cleanup:
TeamsBotApplicationwithBotApplicationand updated constructor parameters and dependency injection registrations accordingly inCompatAdapter,CompatBotAdapter,AdapterWithErrorHandler, and related files. ([[1]](https://github.com/microsoft/teams.net/pull/391/files#diff-e6d701ce121dda6651c0dea00498d45e2cc0b0cec446a578f3058be691c7c0f5L26-R25),[[2]](https://github.com/microsoft/teams.net/pull/391/files#diff-e6d701ce121dda6651c0dea00498d45e2cc0b0cec446a578f3058be691c7c0f5L35-R34),[[3]](https://github.com/microsoft/teams.net/pull/391/files#diff-c443812ac75b10f0cb9e0929a1165dee72b7c96adbd232d830a65348ccd1b42bL28-R32),[[4]](https://github.com/microsoft/teams.net/pull/391/files#diff-e5922e6d5c7613f25aefa88e9c33d5a6c34be42d4353354e5f0e36f1715a0290L8-R16),[[5]](https://github.com/microsoft/teams.net/pull/391/files#diff-cb614beeb934fbb598ccac80c19a12a440f301b38b67b0e2796e861754fe59caL274-R280),[[6]](https://github.com/microsoft/teams.net/pull/391/files#diff-4a8e01c7cbf79ebf85f84bb4bef8cf1d3b02dc8a5875df6e9b34ac819fb7f80fL20-R20))Microsoft.Teams.Bot.AppsandMicrosoft.Teams.Bot.Apps.SchematoMicrosoft.Teams.Bot.CoreandMicrosoft.Teams.Bot.Core.Schemaas appropriate. ([[1]](https://github.com/microsoft/teams.net/pull/391/files#diff-b9be640e365d9187b0d1a2021dddb84311b737f8c28b16428e3b2a450a4f331aL8-R11),[[2]](https://github.com/microsoft/teams.net/pull/391/files#diff-92ebcca71bdaad244e949c815cbf1152d5a3d814cc007052ae7ad2dd8ab225a9L8),[[3]](https://github.com/microsoft/teams.net/pull/391/files#diff-e6d701ce121dda6651c0dea00498d45e2cc0b0cec446a578f3058be691c7c0f5L9),[[4]](https://github.com/microsoft/teams.net/pull/391/files#diff-c443812ac75b10f0cb9e0929a1165dee72b7c96adbd232d830a65348ccd1b42bL9),[[5]](https://github.com/microsoft/teams.net/pull/391/files#diff-0317e1008e12e306d92289bc421d83933ace0400793ed8ad8abf13b03b68511eL7-R7))Dependency Injection and Service Registration:
InitCompatAdapter.csandCompatHostingExtensions.csto useAddBotApplicationinstead ofAddTeamsBotApplication, and updated singleton registrations to useBotApplication. ([[1]](https://github.com/microsoft/teams.net/pull/391/files#diff-cb614beeb934fbb598ccac80c19a12a440f301b38b67b0e2796e861754fe59caL274-R280),[[2]](https://github.com/microsoft/teams.net/pull/391/files#diff-0317e1008e12e306d92289bc421d83933ace0400793ed8ad8abf13b03b68511eL45-R45))Schema and Compatibility Layer Updates:
ConversationAccountfrom the new core schema instead of legacy types, including the conversion logic for Teams channel accounts. ([[1]](https://github.com/microsoft/teams.net/pull/391/files#diff-2b447b715e5c577302421ca232985ced9354b64def7b26219525758928d097daL427-L435),[[2]](https://github.com/microsoft/teams.net/pull/391/files#diff-92ebcca71bdaad244e949c815cbf1152d5a3d814cc007052ae7ad2dd8ab225a9L118-L204))[core/src/Microsoft.Teams.Bot.Compat/CompatActivity.csL118-L204](https://github.com/microsoft/teams.net/pull/391/files#diff-92ebcca71bdaad244e949c815cbf1152d5a3d814cc007052ae7ad2dd8ab225a9L118-L204))Bot Sample Improvements:
EchoBotsample to fetch and echo the user's display name, and in group conversations, to retrieve and display team details and paged member names using the new compatibility APIs. ([core/samples/CompatBot/EchoBot.csL37-R79](https://github.com/microsoft/teams.net/pull/391/files#diff-b9be640e365d9187b0d1a2021dddb84311b737f8c28b16428e3b2a450a4f331aL37-R79))Miscellaneous:
System.Text.Json.Serializationusing directive inCompatTeamsInfo.Models.cs. ([core/src/Microsoft.Teams.Bot.Compat/CompatTeamsInfo.Models.csR4](https://github.com/microsoft/teams.net/pull/391/files#diff-b1e303edd8e27c1011150ab48fe66a5de7f2e8ff54a6850a87efc57bcbd46583R4))These changes modernize the codebase, improve maintainability, and ensure compatibility with the latest Teams Bot SDK core components.