Skip to content

feat(client): move sendReaction method to the Client#201695

Open
maxkoryukov wants to merge 1 commit intowwebjs:mainfrom
volebo:feat/client-send-reaction.mk
Open

feat(client): move sendReaction method to the Client#201695
maxkoryukov wants to merge 1 commit intowwebjs:mainfrom
volebo:feat/client-send-reaction.mk

Conversation

@maxkoryukov
Copy link
Copy Markdown

PR Details

Message.react moved to Client.sendReaction (and the old Message.react now calls
`this.client.sendReaction)

Description

The new method created from Message.react, and the original method now calls the new one.

Motivation and Context

With this method it is possible to send reactions to any message, not only to the just received message, or fetched by "load/fetch messages"

How Has This Been Tested

Basically, the code were just moved, so I called both:

  • msg.react
  • client.sendReaction

and both worked in private/group messages.

Environment

I've tested with whatsapp-web.js@1.34.6 inside a node:24.12.0-alpine3.23 (linux) docker image.

webVersion: "2.3000.1036705643"

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the style guidelines of this project.
  • All new and existing tests pass (npm test).
  • Typings (e.g. index.d.ts) have been updated if necessary.
  • Usage examples (e.g. example.js) / documentation have been updated if applicable.

Related PRs

@github-actions github-actions bot added api changes API modifications typings Type definitions labels Apr 6, 2026
BenyFilho
BenyFilho previously approved these changes Apr 6, 2026
@BenyFilho BenyFilho added the approved Confirmed by maintainers label Apr 6, 2026
@BenyFilho
Copy link
Copy Markdown
Member

Check Lint errors

@BenyFilho BenyFilho dismissed their stale review April 6, 2026 14:52

Lint Errors

@BenyFilho BenyFilho removed the approved Confirmed by maintainers label Apr 6, 2026
`Message.react` moved to `Client.sendReaction`
@maxkoryukov maxkoryukov force-pushed the feat/client-send-reaction.mk branch from 76c8425 to f64f799 Compare April 6, 2026 19:15
@maxkoryukov
Copy link
Copy Markdown
Author

Check Lint errors

I've fixed it.

And today I also will run jsdoc to add sendReaction to the documentation

@BenyFilho BenyFilho added the approved Confirmed by maintainers label Apr 6, 2026
@maxkoryukov
Copy link
Copy Markdown
Author

guys, i ran jsdoc , because i've added a new method on the Client class, but it seems like the documentation wasn't updated for a while, and there are too many changes to include them all into this PR

so i split them:

but the obviously - the "doc PR" contains all changes from "js PR"

@Adi1231234
Copy link
Copy Markdown
Contributor

Nice work!

@BenyFilho BenyFilho enabled auto-merge (squash) April 7, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api changes API modifications approved Confirmed by maintainers typings Type definitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants