mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
Reaction feature added. (#1400)
* Fix get order. * Fix types. * Add set picture for profile and for groups. * Fix bug. * Fix * Fix types * Fix eslint * Add send reaction feature. * Add send reaction feature. * Add set picture for profile and for groups. * Add send reaction feature. * Add send reaction feature. * Add send reaction feature. * Add send reaction feature. * Add send reaction feature. * Add send reaction feature. * Update src/structures/Reaction.js Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> * Bug fixes. * Bug fixes. * Bug fixes. * Fix * Fix * Fix example * Fix conflict * Fix conflict * Fix conflict * Fix conflict * Fix conflict * Fix conflict * move implementation to message model Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Pedro Lopez <pedroslopez@me.com>
This commit is contained in:
committed by
GitHub
parent
a0b18fb685
commit
61c0a6be56
@@ -335,6 +335,18 @@ class Message extends Base {
|
||||
return this.client.sendMessage(chatId, content, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* React to this message with an emoji
|
||||
* @param {string} reaction - Emoji to react with. Send an empty string to remove the reaction.
|
||||
* @return {Promise}
|
||||
*/
|
||||
async react(reaction){
|
||||
await this.client.pupPage.evaluate(async (messageId, reaction) => {
|
||||
const msg = await window.Store.Msg.get(messageId);
|
||||
await window.Store.sendReactionToMsg(msg, reaction);
|
||||
}, this.id._serialized, reaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept Group V4 Invite
|
||||
* @returns {Promise<Object>}
|
||||
|
||||
Reference in New Issue
Block a user