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

@corinagum corinagum commented May 8, 2026

Copy link
Copy Markdown
Collaborator

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) <[email protected]>
@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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
corinagum added a commit that referenced this pull request May 27, 2026
## Summary

Brings `origin/main` into `release` for the **2.0.12** release. **No
carve-outs this time** — Quoted Replies is included.

`version.json`: `2.0.12-preview.{height}` → `2.0.12`.

Aligns with teams.py 2.0.12 (PR #442 already on PyPI / pending publish).

## What's in this release (delta from 2.0.11)

**Features**
- Quoted Replies + new quotes features — previously held back via the
2.0.11 carve-out (#576)
- SuggestedActionSubmitActivity for `suggestedAction/submit` invoke
(#591)
- Default targeted replies for targeted inbound messages (#592)
- Filter colliding keys before `Object.assign` in `ActivityContext`
(#596)
- Prompt Preview support (#536)
- A2A sample (#584)
- AI/MCPClient (#572)
- Allow passing custom HTTP client via `AppOptions`-equivalent
- Reactions API marked GA (#575), Rename `ReactionClient.remove()` →
`delete()` (#567)

**Security & fixes**
- Security hardening: tighten cross-origin policies (#595)
- Lock JsonWebToken trust-boundary contract (#586)
- `fix(deps)`: npm audit fix — clears all high-severity advisories
(#599)
- `fix(apps)`: log inbound activities at info, warn on missing
Authorization (#568)
- `fix`: App user-agent merging (#573)
- `fix`: Add null checks in `local-memory.ts` to prevent role crash
(#438)
- `fix`: `@microsoft/teams.client` import error in webpack 5 (#566)
- Switch to named imports without subpaths (#561)

**Deprecations / package changes**
- Deprecate `DevtoolsPlugin` in favor of Microsoft 365 Agents Playground
(#593)
- Remove in-repo Teams CLI package (#580) — moved to
`teams-sdk/packages/cli`
- Deprecate AI Libraries (#588)
- Correct imports + return types in misc. packages (#589)

**Dependency bumps**
- turbo 2.8.11 → 2.9.14 (#587)
- qs 6.15.0 → 6.15.2 (#594)
- hono 4.12.14 → 4.12.16 (#562)
- npm audit fix bundle (#599): axios 1.13.5 → 1.16.1, fast-uri 3.1.0 →
3.1.2, ws 8.19.0 → 8.21.0, @azure/msal-node hoisted 5.2.2, uuid 11.1.0 →
11.1.1, @azure/identity 4.13.0 → 4.13.1, express-rate-limit, ip-address,
brace-expansion, etc.

## Quoted Replies inclusion notes

- Teams client rendering is in-sync with the wire format as of
2026-05-06.
- APX QR rollout completed: Public 2026-04-10, GCCH/DoD/Gallatin
2026-04-14.
- No SDK-side carve-outs needed; this matches the teams.py 2.0.12 (PR
#442) decision.

## Branch structure note

`prep-release/2.0.12` is reset to `origin/main` + a one-line
`version.json` bump. Diff against `release` (this PR) shows the full
delta from 2.0.11. We deliberately did not use a 2-parent merge commit —
the auto-merge tried to interleave non-overlapping hunks from main's QR
additions with release's QR carve-outs in `activity.ts`, producing a
semantically broken file. Reset-to-main + version bump is the clean way
to express "release should equal main."

## Test plan

- [x] `npm install` clean (post-audit-fix lockfile)
- [x] `npm run build` — 33/33 targets clean
- [x] `npm test` — 14/14 task targets, 279+ tests pass
- [x] E2E echo bot smoke test against `cg-test-bot-py` via canary ABS —
done on `cg/audit-deps-ts` (now merged); covers axios + msal-node code
paths
- [ ] Pipeline Build + Test stages green on `release` after merge
- [ ] Publish pipeline run with **Public** → ESRP → npm
`@microsoft/teams.*@2.0.12`
- [ ] Smoke install: `npm view @microsoft/teams[email protected]` after
publish
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