From 03498ea477bea8cd9ce6ba6a2c287ed8493a2f88 Mon Sep 17 00:00:00 2001 From: Bastian Novoa Date: Sat, 14 Mar 2026 16:56:49 -0300 Subject: [PATCH] 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 --------- Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com> Co-authored-by: BenyFilho --- src/structures/Message.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index f35744f..2711309 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -485,10 +485,9 @@ class Message extends Base { .Msg.getMessagesById([messageId]) )?.messages?.[0]; if (!msg) return null; - await window.require('WAWebSendReactionMsgAction')( - msg, - reaction, - ); + await window + .require('WAWebSendReactionMsgAction') + .sendReactionToMsg(msg, reaction); }, this.id._serialized, reaction,