docs: migrate examples to flattened conversation API - #2915
Open
heyitsaamir wants to merge 1 commit into
Open
Conversation
Update reaction, member, and activity examples to the flattened 2-hop conversation client methods (ts#634 / py#502) instead of the now-deprecated chained accessors: - reactions.add/delete -> conversations.addReaction/deleteReaction - conversations.members(id).get -> conversations.getMembers - conversations.members(id).getById -> conversations.getMemberById - conversations.activities(id).create -> conversations.createActivity Applies to TS + Python teaching fragments and the botbuilder migration mapping tables. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Teams SDK documentation include-fragments to teach the newer flattened conversation API surface (2-hop access) instead of deprecated chained accessors, aligning guidance with the post-deprecation SDK shape.
Changes:
- Replace deprecated
conversations.members(...).get*()usage withconversations.getMembers(...)/getMemberById(...)(TS) andget_members(...)/get_member_by_id(...)(Python). - Replace deprecated
reactions.*usage withconversations.addReaction/deleteReaction(TS) andconversations.add_reaction/delete_reaction(Python). - Update BotBuilder→Teams SDK mapping tables to match the new method names (with one remaining inconsistency noted in comments).
Show a summary per file
| File | Description |
|---|---|
| teams.md/src/components/include/migrations/botbuilder/the-api-client/typescript.incl.md | Migrates BotBuilder migration examples/table rows to flattened conversation methods (TS). |
| teams.md/src/components/include/migrations/botbuilder/the-api-client/python.incl.md | Migrates BotBuilder migration examples/table rows to flattened conversation methods (Python). |
| teams.md/src/components/include/in-depth-guides/message-reactions/typescript.incl.md | Updates reactions examples to use api.conversations.addReaction/deleteReaction (TS). |
| teams.md/src/components/include/in-depth-guides/message-reactions/python.incl.md | Updates reactions examples to use ctx.api.conversations.add_reaction/delete_reaction (Python). |
| teams.md/src/components/include/in-depth-guides/message-extensions/action-commands/typescript.incl.md | Updates member listing example to api.conversations.getMembers(...) (TS). |
| teams.md/src/components/include/in-depth-guides/message-extensions/action-commands/python.incl.md | Updates member listing example to ctx.api.conversations.get_members(...) (Python). |
| teams.md/src/components/include/essentials/api/typescript.incl.md | Updates essentials API snippet to api.conversations.getMembers(...) (TS). |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Low
| | BotBuilder (TeamsInfo) | Teams SDK (ApiClient) | | ||
| |------------------------|----------------------| | ||
| | `TeamsInfo.getMembers(context, user_id)` | `api.conversations.members(conversation_id).get(user_id)` | | ||
| | `TeamsInfo.getMembers(context, user_id)` | `api.conversations.get_member_by_id(conversation_id, user_id)` | |
corinagum
approved these changes
Jul 16, 2026
Collaborator
|
It might be a little premature to ship this since the flattening isn't released in PY yet, I believe. |
Collaborator
Author
|
Agree. Not pushing yet @corinagum. My automation just caught this |
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.
Summary
Weekly doc-accuracy sweep found that several teaching examples still use the chained conversation-client accessors that were deprecated by the flatten PRs (microsoft/teams.ts#634, microsoft/teams.py#502). These are additive/backward-compatible deprecations, so nothing is broken today — but the docs should teach the new 2-hop API.
Changes
Verified the new signatures against SDK source and updated the affected TS + Python fragments:
reactions.add/reactions.deleteconversations.addReaction/conversations.deleteReactionconversations.members(id).get()conversations.getMembers(id)conversations.members(id).getById(userId)conversations.getMemberById(id, userId)conversations.activities(id).create(...)conversations.createActivity(id, ...)Files touched:
in-depth-guides/message-reactions/{typescript,python}.incl.mdessentials/api/typescript.incl.mdin-depth-guides/message-extensions/action-commands/{typescript,python}.incl.mdmigrations/botbuilder/the-api-client/{typescript,python}.incl.md(code + mapping tables)Notes
blog/2026-05-18-reaction-extensibility-preview) intentionally left unchanged — it is point-in-time.Verification
src/components/include.