Rename ReactionClient.remove() to delete()#567
Merged
Conversation
Aligns the experimental ReactionClient method name with teams.py (delete()) and teams.net (DeleteAsync()), resolving the cross-SDK naming inconsistency. The class is marked @experimental(ExperimentalTeamsReactions), so this is within the breaking-change contract and no back-compat alias is added. Also refreshes the examples reactions README reaction-types list, which was still showing the legacy Bot Framework types (laugh, surprised, sad, angry) instead of the modern Teams set the SDK actually exports. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the experimental reactions API method from ReactionClient.remove() to ReactionClient.delete() to align naming with the equivalent APIs in other Teams SDKs, and updates tests and examples accordingly.
Changes:
- Renamed
ReactionClient.remove()toReactionClient.delete()and updated the method’s JSDoc. - Updated unit tests and example bot code to call
api.reactions.delete(...). - Refreshed reactions example README to use
delete()and to reflect the SDK’s currentMessageReactionTypevalues.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/api/src/clients/reaction/reaction.ts | Renames the reaction removal API to delete() and updates method documentation. |
| packages/api/src/clients/reaction/reaction.spec.ts | Updates test names and call sites to use delete() instead of remove(). |
| packages/api/src/activities/message/message-reaction.ts | Adjusts deprecation guidance to point to api.reactions.delete. |
| examples/reactions/src/index.ts | Updates example usage to call api.reactions.delete(...). |
| examples/reactions/README.md | Updates sample code to delete() and refreshes documented reaction types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4 tasks
heyitsaamir
approved these changes
May 8, 2026
rido-min
approved these changes
May 8, 2026
corinagum
added a commit
to microsoft/teams-sdk
that referenced
this pull request
May 14, 2026
## Summary Adds an in-depth guide for message reactions covering outbound add/remove and inbound `messageReaction` handling, plus links the existing "Reactions" section in the Sending Messages essentials page to the new guide. ## What's covered in the guide - Public-developer-preview banner - Adding and removing reactions (`api.reactions.add` / `api.reactions.delete` / `Reactions.AddAsync` / `Reactions.DeleteAsync`) - Receiving reactions: `messageReaction` activity handlers across all three SDKs, plus the .NET-only `OnMessageReactionAdded` / `OnMessageReactionRemoved` sub-handlers - Available reaction types — the modern set of 6 (`like`, `heart`, `1f440_eyes`, `2705_whiteheavycheckmark`, `launch`, `1f4cc_pushpin`) - Skin tone variants (`-tone1` … `-tone5`) - Rate limits (2 reactions/sec, 429 + Retry-After) - Best practices and differences from Feedback ## What's intentionally omitted - **Custom reactions section** — aligned with the Microsoft Learn agent reactions PR ([msteams-docs#13991](MicrosoftDocs/msteams-docs#13991)), which is omitting custom reaction examples due to a known client-side rendering issue. A commented-out link to the Learn reactions reference remains in the source for restoration once that PR lands. - **Advanced API client usage** — the previous draft's example referenced an `ApiClient` constructor that doesn't exist in the current SDK; removed rather than rewritten. ## Coordination - C# samples follow the project convention from #2735 (cancellationToken in handler signatures, threaded through `Send`, `Task.Delay`, and reaction API calls). - The TypeScript include uses `api.reactions.delete()` ahead of [microsoft/teams.ts#567](microsoft/teams.ts#567), which renames `remove()` → `delete()` to align with teams.py and teams.net. ## Test plan - [x] `npm start` regenerates docs cleanly with no content gaps - [x] Per-language renders (TS / Python / C#) verified in the dev server - [x] Cross-link from `essentials/sending-messages` → in-depth guide resolves correctly - [ ] Visual review on the deployed preview --------- Co-authored-by: Corina Gum <14900841+corinagum@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Renames the experimental
ReactionClient.remove()method todelete()to align with the equivalents in teams.py (delete()) and teams.net (DeleteAsync()). The cross-SDK naming inconsistency was the only divergence in the reactions API surface.The
ReactionClientclass is annotated@experimental("ExperimentalTeamsReactions"). This rename is within the breaking-change contract for that diagnostic, so no back-compat alias is added.Changes
packages/api/src/clients/reaction/reaction.ts— method rename + JSDocpackages/api/src/clients/reaction/reaction.spec.ts— updated test names and call sitespackages/api/src/activities/message/message-reaction.ts—@deprecatedJSDoc on the activity helper now points toapi.reactions.deleteexamples/reactions/src/index.ts— usage updatedexamples/reactions/README.md— usage updated, plus refreshed the reaction-types list that was still showing legacy Bot Framework types (laugh,surprised,sad,angry) instead of the modern Teams set the SDK actually exportsTest plan
npx turbo test --filter=@microsoft/teams.apipasses (17/17 suites, 145/145 tests; reaction.ts at 100% coverage)🤖 Generated with Claude Code