fix: WAWebSendReactionMsgAction call to use sendReactionToMsg method (#127101)

* update WAWebSendReactionMsgAction call to use sendReactionToMsg method

The WhatsApp Web internal API changed the WAWebSendReactionMsgAction module 
from a directly callable function to an object with a sendReactionToMsg method.

Before:
  await (window.require('WAWebSendReactionMsgAction'))(msg, reaction);

After:
  await (window.require('WAWebSendReactionMsgAction')).sendReactionToMsg(msg, reaction);

This fixes the TypeError: window.require(...) is not a function error
thrown when attempting to react to messages.

* Refactor react method for improved readability

* Update Message.js

Co-authored-by: @BenyFilho

* Update Message.js

Co-authored-by: @Benyfilho

* Update Message.js

Co-authored-by: @BenyFilho

* Update Message.js

Co-authored-by: BenyFilho <BenyFilho@users.noreply.github.com>

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: BenyFilho <BenyFilho@users.noreply.github.com>
This commit is contained in:
Bastian Novoa 2026-03-14 16:56:49 -03:00 • committed by GitHub
commit 03498ea477
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -485,10 +485,9 @@ class Message extends Base {
.Msg.getMessagesById([messageId]) .Msg.getMessagesById([messageId])
)?.messages?.[0]; )?.messages?.[0];
if (!msg) return null; if (!msg) return null;
await window.require('WAWebSendReactionMsgAction')( await window
msg, .require('WAWebSendReactionMsgAction')
reaction, .sendReactionToMsg(msg, reaction);
);
}, },
this.id._serialized, this.id._serialized,
reaction, reaction,