diff --git a/package.json b/package.json index 9adb8b1e5..61cb64121 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bot-whatsapp/root", - "version": "0.1.27", + "version": "0.1.28", "description": "Bot de wahtsapp open source para MVP o pequeños negocios", "main": "app.js", "private": true, diff --git a/packages/provider/src/baileys/package.json b/packages/provider/src/baileys/package.json index 918a8e97d..fb46b235d 100644 --- a/packages/provider/src/baileys/package.json +++ b/packages/provider/src/baileys/package.json @@ -1,6 +1,7 @@ { "dependencies": { - "@adiwajshing/baileys": "4.4.0", + "@adiwajshing/baileys": "github:WhiskeySockets/Baileys", + "@adiwajshing/keyed-db": "^0.2.4", "wa-sticker-formatter": "4.3.2" } } diff --git a/packages/provider/src/meta/server.js b/packages/provider/src/meta/server.js index 88bd02f6c..15c8ca3d5 100644 --- a/packages/provider/src/meta/server.js +++ b/packages/provider/src/meta/server.js @@ -46,6 +46,19 @@ class MetaWebHookServer extends EventEmitter { } this.emit('message', responseObj) } + + if (message.type === 'interactive') { + const body = message.interactive?.button_reply?.title || message.interactive?.list_reply?.id; + const title_list_reply = message.interactive?.list_reply?.title; + const responseObj = { + type: 'interactive', + from: message.from, + to, + body, + title_list_reply, + } + this.emit('message', responseObj); + } if (message.type === 'image') { const body = generateRefprovider('_event_image_') diff --git a/starters/apps/base-baileys-json/package.json b/starters/apps/base-baileys-json/package.json index 4c9047206..3319b212e 100644 --- a/starters/apps/base-baileys-json/package.json +++ b/starters/apps/base-baileys-json/package.json @@ -14,8 +14,9 @@ "@bot-whatsapp/database": "latest", "@bot-whatsapp/provider": "latest", "@bot-whatsapp/portal": "latest", - "@adiwajshing/baileys": "4.4.0", "mime-types": "2.1.35", + "@adiwajshing/baileys": "github:WhiskeySockets/Baileys", + "@adiwajshing/keyed-db": "^0.2.4", "wa-sticker-formatter": "4.3.2" }, "author": "", diff --git a/starters/apps/base-baileys-memory/package.json b/starters/apps/base-baileys-memory/package.json index f300b755a..1cf8e7f95 100644 --- a/starters/apps/base-baileys-memory/package.json +++ b/starters/apps/base-baileys-memory/package.json @@ -14,8 +14,8 @@ "@bot-whatsapp/database": "latest", "@bot-whatsapp/provider": "latest", "@bot-whatsapp/portal": "latest", - "@adiwajshing/baileys": "4.4.0", - "mime-types": "2.1.35", + "@adiwajshing/baileys": "github:WhiskeySockets/Baileys", + "@adiwajshing/keyed-db": "^0.2.4", "wa-sticker-formatter": "4.3.2" }, "author": "", diff --git a/starters/apps/base-baileys-mongo/package.json b/starters/apps/base-baileys-mongo/package.json index 03f337fa6..473bd1198 100644 --- a/starters/apps/base-baileys-mongo/package.json +++ b/starters/apps/base-baileys-mongo/package.json @@ -14,9 +14,10 @@ "@bot-whatsapp/database": "latest", "@bot-whatsapp/provider": "latest", "@bot-whatsapp/portal": "latest", - "@adiwajshing/baileys": "4.4.0", "mime-types": "2.1.35", "mongodb": "^4.12.1", + "@adiwajshing/baileys": "github:WhiskeySockets/Baileys", + "@adiwajshing/keyed-db": "^0.2.4", "wa-sticker-formatter": "4.3.2" }, "author": "", diff --git a/starters/apps/base-baileys-mysql/package.json b/starters/apps/base-baileys-mysql/package.json index ae46a0fee..0b9c67e3e 100644 --- a/starters/apps/base-baileys-mysql/package.json +++ b/starters/apps/base-baileys-mysql/package.json @@ -14,9 +14,9 @@ "@bot-whatsapp/database": "latest", "@bot-whatsapp/provider": "latest", "@bot-whatsapp/portal": "latest", - "@adiwajshing/baileys": "4.4.0", - "mime-types": "2.1.35", "mysql2": "^2.3.3", + "@adiwajshing/baileys": "github:WhiskeySockets/Baileys", + "@adiwajshing/keyed-db": "^0.2.4", "wa-sticker-formatter": "4.3.2" }, "author": "",