Skip to content

Rename ReactionClient.remove() to delete()#567

Merged
corinagum merged 1 commit into
mainfrom
cg/reactions-delete
May 8, 2026
Merged

Rename ReactionClient.remove() to delete()#567
corinagum merged 1 commit into
mainfrom
cg/reactions-delete

Conversation

@corinagum
Copy link
Copy Markdown
Collaborator

@corinagum corinagum commented May 8, 2026

Summary

Renames the experimental ReactionClient.remove() method to delete() 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 ReactionClient class 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 + JSDoc
  • packages/api/src/clients/reaction/reaction.spec.ts — updated test names and call sites
  • packages/api/src/activities/message/message-reaction.ts@deprecated JSDoc on the activity helper now points to api.reactions.delete
  • examples/reactions/src/index.ts — usage updated
  • examples/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 exports

Test plan

  • npx turbo test --filter=@microsoft/teams.api passes (17/17 suites, 145/145 tests; reaction.ts at 100% coverage)
  • Smoke-run the reactions example bot

🤖 Generated with Claude Code

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>
@corinagum corinagum marked this pull request as ready for review May 8, 2026 20:46
Copilot AI review requested due to automatic review settings May 8, 2026 20:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() to ReactionClient.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 current MessageReactionType values.

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.

@corinagum corinagum merged commit da46d27 into main May 8, 2026
14 checks passed
@corinagum corinagum deleted the cg/reactions-delete branch May 8, 2026 21:29
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants