From abf89ff9d5f5ca8005fc738fda8d2fb56b044d31 Mon Sep 17 00:00:00 2001 From: Jorge Chavarriaga Date: Fri, 10 Nov 2023 09:21:31 -0500 Subject: [PATCH] feat: se adiciona la funcionalidad de enviar reacciones para el proveedor meta sendReaction se incluye la opcion de poder enviar reacciones a los mensajes al provider meta --- packages/provider/src/meta/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/provider/src/meta/index.js b/packages/provider/src/meta/index.js index 37337709a..b43be65c0 100644 --- a/packages/provider/src/meta/index.js +++ b/packages/provider/src/meta/index.js @@ -521,6 +521,24 @@ class MetaProvider extends ProviderClass { this.sendtext(number, message) } + + /** + * @param {*} number + * @param {*} react + */ + sendReaction = async (number, react) => { + const body = { + messaging_product: 'whatsapp', + recipient_type: 'individual', + to: number, + type: 'reaction', + reaction: { + message_id: react.message_id, + emoji: react.emoji, + }, + } + return this.sendMessageMeta(body) + } } module.exports = MetaProvider