Add WhatsApp reactions support

Summary:

Test Plan:
This commit is contained in:
Sash Zats
2026-01-06 20:42:05 -05:00
committed by Peter Steinberger
parent aa87d6cee8
commit 551a8d5683
12 changed files with 207 additions and 2 deletions

View File

@@ -566,6 +566,30 @@ export async function monitorWebInbox(options: {
const jid = toWhatsappJid(to);
await sock.sendPresenceUpdate("composing", jid);
},
/**
* Send a reaction (emoji) to a specific message.
* Pass an empty string for emoji to remove the reaction.
*/
sendReaction: async (
chatJid: string,
messageId: string,
emoji: string,
fromMe: boolean,
participant?: string,
): Promise<void> => {
const jid = toWhatsappJid(chatJid);
await sock.sendMessage(jid, {
react: {
text: emoji,
key: {
remoteJid: jid,
id: messageId,
fromMe,
participant,
},
},
});
},
} as const;
}